SecureCRT SSH连接报错问题解决
SecureCRT连接服务器时报错,报错信息为:
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

1、原因分析
错误原因是SecureCRT 7.0客户端支持的和kali作为ssh服务端支持的SSH秘钥交换算法不匹配。
Secure CRT 7.0的默认支持key exchange算法:
2、解决方法有以下两种:
第一种: 升级SecureCRT为最新版,或者使用其他连接工具
第二种: 修改服务器,使其兼容老系统的算法
这里使用第二种方法,通过修改ssh的配置来解决
vim /etc/ssh/sshd_config
HostKeyAlgorithms ssh-dss,ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512 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
systemctl restart sshd
问题解决

浙公网安备 33010602011771号