转!!java ssh远程服务器报错 解决方法 Key exchange was not finished, connection is closed

转自:https://blog.csdn.net/weixin_45266856/article/details/129754122

ssh中的key交换算法不兼容导致

 

ssh报错解决:
vi /etc/ssh/sshd_config

KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

service sshd restart

 

posted @ 2023-09-26 18:25  乌云de博客  阅读(253)  评论(0编辑  收藏  举报