一方法:
①排除了网络、防火墙等因素
②查看sshd服务状态:
# sudo systemctl status ssh
在/etc/ssh/sshd_config配置文件最后面添加下面一行:
root@reyn-virtual-machine:~# vi /etc/ssh/sshd_config
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
root@reyn-virtual-machine:~# systemctl restart sshd.service