xftp连接时,出现服务器发送了一个意外的数据包。received:3,expected:20错误的解决

Scroll Down

现象

xftp连接时,出现报错:服务器发送了一个意外的数据包。received:3,expected:20

sshd版本:openssh-server 1:8.2p1-4ubuntu0.2

原因

可能是新版的sshd和xftp有兼容性问题

解决方案

在/etc/ssh/sshd_config最后增加以下一行

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

重启sshd服务

service sshd restart