试了很多方法都没有效果,终于让我找到秘籍

SecureCRT低版本连接高版本SSH服务器报错无法连接的问题
如SecureCRT 6.1连接Ubuntu 20.04.1

Key exchange failed.
No compatible key exchange method. The server supports these methods: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256

Ubuntu服务器
vim /etc/ssh/sshd_config
添加

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-group-exchange-sha1,diffie-hellman-group1-sha1

重启ssh服务

service ssh restart

参考:
https://zhuanlan.zhihu.com/p/358671357

Logo

更多推荐