问题描述:直接使用ssh命令可以连接服务器,但是,使用xshell连接就报错。
问题原因:可能是xshell与服务器的sshd版本不兼容导致
处理办法:
- 使用ssh命令登录远程服务器
- 修改服务器ssh配置:
echo "KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1" >> /etc/ssh/sshd_config
- 重启ssh服务:
systemctl restart ssh
- 重新使用xshell测试是否可以正常连接
网友评论