xshell连接时显示“服务器发送了一个意外的数据包。received:3,expected:20“问题的解决方法

xshell连接时显示“服务器发送了一个意外的数据包。received:3,expected:20“问题的解决方法

解决方法:在/etc/ssh/sshd_config最后增加以下一行

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

然后重启sshd服务或者重载服务配置文件

systemctl restart ssh
问题解决。

posted @ 2021-05-13 13:19  sing1122  阅读(4244)  评论(0编辑  收藏  举报