ssh server 不支持diffie-hellman-group1-sha1问题

用navicat for MySQL连接时报错无法连接(SSH终端连接正常),错误信息为:

Server does not support diffie-hellman group1-sha1 for keyexchange


搜索一番找到几个方法,最终用下面的方法解决。

 

可以进入修改 /etc/ssh/sshd_config 

添加

KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1

Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr

保存后运行:

ssh-keygen -A


之后service ssh restart重启sshd


解决!!

原文链接: ssh server 不支持diffie-hellman-group1-sha1问题 版权所有,转载时请注明出处,违者必究。
注明出处格式:流沙团 ( https://www.gyarmy.com/post-228.html )

发表评论

0则评论给“ssh server 不支持diffie-hellman-group1-sha1问题”