解决新发行版用老ssh工具无法连接

出现错误

1
2
Key exchange failed.
No compatible key exchange method. The server supports these methods: curve25519-sha256,[email protected],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

解决方法

问题分析,新系统加密验证方式旧版本ssh客户端软件不支持,进行修改即可。
vi /etc/ssh/sshd_config在最下方空白输入

1
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服务
sudo service ssh restart


解决新发行版用老ssh工具无法连接
https://hexo.psorai.eu.org/2023/06/06/解决新发行版用老ssh工具无法连接/
Author
Sora
Posted on
June 6, 2023
Licensed under