OSX 10.11 启用 ssh diffie-hellman-group1-sha1

OSX 10.11 启用 ssh diffie-hellman-group1-sha1

自从我们将 mac 从 10.10 更新到 10.11 后,我们的 tomcat 就无法再连接,并出现错误

[SSH] Exception:Algorithm negotiation fail

这个答案表明我们必须再次启用 diffie-hellman-group1-sha1: https://stackoverflow.com/questions/26424621/algorithm-negotiation-fail-ssh-in-jenkins

我试过

sudo vi /private/etc/ssh/sshd_config

并添加了一行,因为没有以“Ciphers”开头的行

Ciphers [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc,diffie-hellman-group1-sha1

但在重启守护进程后

sudo launchctl stop com.openssh.sshd; sudo launchctl start com.openssh.sshd;

我根本无法连接

答案1

这个答案表明我们必须再次启用 diffie-hellman-group1-sha1:https://stackoverflow.com/questions/26424621/algorithm-negotiation-fail-ssh-in-jenkins

diffie-hellman-group1-sha1不是密码,而是密钥交换算法。您需要允许它,例如:

KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

该行Ciphers [...] diffie-hellman-group1-sha1无效,它会阻止您的服务器启动。

相关内容