ubuntu 使用xshell5连接跳板机,出现问题: “服务器发送了一个意外的数据包”received:3,expected:20

发布时间 2023-04-12 16:35:10作者: muzlei

xshell5访问报错,“服务器发送了一个意外的数据包。received:3,expected:20”

1、排除了网络、防火墙等因素
2、查看sshd服务状态:
3、在/etc/ssh/sshd_config配置文件最后面添加下面一行:

KexAlgorithms curve25519-sha256@libssh.org,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

保存后,重启sshd服务

systemctl restart ssh