secureCRT提示Key exchange failed. No compatible key exchange method
Posted 每天看一遍,防止恋爱&&堕落
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了secureCRT提示Key exchange failed. No compatible key exchange method相关的知识,希望对你有一定的参考价值。
问题描述
安装了ubuntu20.04后,以前老版本的secureCRT通过ssh连接后报错
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
解决方法
需要修改两个地方:
修改ssh_config
sudo vi /etc/ssh/ssh_config
打开这两行的注释
修改sshd_config
sudo vi /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
重新启动服务并测试
重启sshd服务
sudo service sshd restart
重新连接:
以上是关于secureCRT提示Key exchange failed. No compatible key exchange method的主要内容,如果未能解决你的问题,请参考以下文章
secureCRT提示Key exchange failed. No compatible key exchange method
Xshell5 连接ubuntu20.04.3失败,提示找不到匹配的key exchange算法
failed to open the host key database file