报错: ssh Key exchange was not finished
则需修改sshd文件
链接:Key exchange was not finished,connection is closed近期遇到这个错误sshd更新导致的 - it610.com
需在
在/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
文件路径: /etc/ssd/sshd_config
如果是只读文件 readonly,不可修改,则使用chmod 777 sshd_config
报错:chmod: Unable to change file mode on ssh_config: Operation not permitted
则需要使用sudo chmod 777 sshd_config
修改sshd文件应当修改远端,修改完后需要重启sshd服务
重启命令:service sshd restart