连接到会话 XXX 失败:Key exchange failed.No compatible key exchange method. The server supports t

修改服务器,兼容老系统的算法

vi /etc/ssh/sshd_config
#加入下面的文本  
KexAlgorithms [email protected],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
#重启ssh
systemctl restart sshd.service

你可能感兴趣的:(服务器,linux,运维)