SecureCRT报错Key exchange failed解决方法

简介

我还在用SecureCRT老版本,但是经常会出现连接高版本的linux系统报错Key exchange failed……,比如我连ubuntu18没得问题,但是连ubuntu20就会报错。这个和ssh6.7以上屏蔽不安全算法有关,我出问题的版本是SecureCRT version 7.0.0,其实只是要换个SecureCRT新一点的软件版本也可以解决问题,我这里分享的是修改服务器的方法来兼容老的算法,其实高版本linux和低版本系统差别就在多出来的那一行加密算法上。

 

报错完整信息

Key exchange failed.
No compatible key exchange method. The server supports these methods: sntrup761x25519-sha512@openssh.com,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
No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519

 

教程

我到vultr的vnc当中修改编辑/etc/ssh/sshd_config文件

vi /etc/ssh/sshd_config

复制这一行加密算法,添加到最后,保存

HostKeyAlgorithms=+ssh-rsa,ssh-dss
KexAlgorithms=+diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

重启ssh服务,后就可以连上了

service ssh restart

然后再次连,就OK了,完美解决,老版本我用的是便携版的用了很多年,不舍得换

阅读剩余
THE END