类别:Linux / 日期:2026-08-25 / 浏览:91 / 评论:0

SecureCRT6.5.0用ssh连接ubuntu22.04,出现以下错误 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,sntrup761x25519-sha512@openssh.com,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,kex-strict-s-v00@openssh.com No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519

这个错误信息表明,你使用的 SecureCRT 6.5.0 版本太旧,它支持的密钥交换算法和主机密钥算法,与 Ubuntu 22.04 默认启用的新算法(如 curve25519-sha256)完全对不上,导致无法安全地建立连接。

方案一:升级或更换SSH客户端 (强烈推荐)

方案二:修改Ubuntu服务器端SSH配置 (测试或学习用途,或临时兼容方案)

编辑SSH配置文件

sudo 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
HostKeyAlgorithms ssh-rsa,ssh-dss

PixPin_2026-08-25_10-33-12.jpg

重启SSH服务:使配置生效

sudo systemctl restart sshd



打赏

感谢您的赞助~

打开支付宝扫一扫,即可进行扫码打赏哦~

版权声明 : 本文未使用任何知识共享协议授权,您可以任何形式自由转载或使用。

 可能感兴趣的文章