【问题标题】:PhpStorm: Algorithm negotiation failPhpStorm:算法协商失败
【发布时间】:2015-04-21 04:21:10
【问题描述】:

我有一个远程服务器来托管我的项目。而且我在本地使用我的 PhpStorm,所以每次保存时,它都会自动与远程服务器同步。

但是,我未能将 PhpStorm 配置为在远程服务器上运行 PHPUnit。

Configure Remote PHP Interpreter 下,我填写了正确的信息(主机、用户名和密码)。

我在验证时遇到的错误是"Algorithm negotiation fail",在我尝试指定 PHP 解释器的路径时是 "Test SFTP Connection: Connection to 'id address' failed. Connection failed"

我该如何解决?

【问题讨论】:

标签: windows phpunit phpstorm


【解决方案1】:

我遇到了同样的问题。我通过添加

解决了这个问题
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie- hellman-group1-sha1

/etc/ssh/sshd_config 
然后我重新启动 sshd
sudo systemctl restart sshd

【讨论】:

  • 我在创建一个新的 vagrant box 后遇到了同样的问题,可以确认这对我有用。
  • 其实KexAlgorithms diffie-hellman-group1-sha1 就足够了(至少对我来说)
  • 我刚刚尝试了这个解决方案,我没有遇到算法错误但 ssh 被阻止。尝试使用 ssh 连接时,我总是遇到“连接被拒绝”...
  • 使用 Debian 8 openssh/sftp-server,谢谢。
  • 这对我也有用。 “做/意思”这行是什么意思?
【解决方案2】:

刚升级Ubuntu到16.04,遇到了这个问题,PHPStorm 8.0.3中的“算法协商失败”。

问题出在 jsch-0.1.51.jar 库上。如果你用https://sourceforge.net/projects/jsch/(当前为jsch-0.1.54.jar)的最新版本覆盖jsch-0.1.51.jar文件并重启,应该没问题。无需向 ssh 守护进程添加不安全的算法。

【讨论】:

    【解决方案3】:

    正如 Guillaume Fache 所建议的,PhpStorm 的最低配置是:

    KexAlgorithms diffie-hellman-group1-sha1

    但是diffie-hellman-group1-sha1 使用:

    1) 1024 bits modulus - 易碎,标记为insecure

    2) SHA-1 - 可破坏,确认碰撞攻击的可能性


    结论:

    使用公钥/私钥对 - 更安全,无需保存或输入密码

    【讨论】:

      【解决方案4】:

      编辑此文件:

      sudo /etc/ssh/sshd_config 
      

      添加这一行:

      KexAlgorithms diffie-hellman-group1-sha1
      

      然后重启:

      sudo systemctl restart sshd
      

      它对我有用!

      【讨论】:

        猜你喜欢
        • 2018-04-14
        • 2017-02-12
        • 1970-01-01
        • 2015-08-14
        • 2015-12-14
        相关资源
        最近更新 更多