2020/04/24

xshell 3.0 無法登入 ubuntu 2004 LTS 版本




當你的 xshell or ssh client 無法登入新版的ssh server...
no matching key exchange method found. Their of offer: diffie-hellman-group1-sha1.

* 錯誤訊息應該長得雷同
# tail /var/log/auth.log
Apr 24 13:43:45 mtchang sshd[1537]: Unable to negotiate with 172.24.0.201 port 61949: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se [preauth]

* 降版本應該可以好

root@mtchang:~# tail -n 5 /etc/ssh/sshd_config

Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com

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


root@jutainet:~# /etc/init.d/ssh restart
Restarting ssh (via systemctl): ssh.service.


參考:
https://blog.csdn.net/qq_33201718/article/details/105433835