新版 sshd 与旧版 Xshell 存在密钥交换算法兼容性问题。
解决方法
在 /etc/ssh/sshd_config 末尾追加:
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
重载配置:
systemctl reload sshd
# 或
systemctl restart sshd