问题 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,sntrup761x25519-sha512@openssh.com,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
解答:
vi /etc/ssh/sshd_config
#add the following text
KexAlgorithmscurve25519-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
#restart ssh
systemctl restart sshd.service
问题 2:
Key exchange failed. No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3JuhnzFZ-1686994586947)(file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml320\wps1.jpg)]-transform:no9�sF�d
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-kkRcfVlt-1686994586948)(file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml320\wps2.jpg)]-transform:no9�sF�d
解决方法:
https://blog.csdn.net/weixin_42804852/article/details/123677678