报错发现
查看系统下的/var/log/messages文件发现有ssh的连接错误
Oct 11 14:49:40 1020839 sshd[12488]: Unable to negotiate with 192.168.50.100 port 57072: no matching host key type found. Their offer: ssh-rsa,ssh-dss [preauth]
Oct 11 14:09:56 1020839 sshd[24440]: Unable to negotiate with 192.168.50.100 port 60796: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 [preauth]
解决方法
编辑/etc/ssh/sshd_config文件,增加如下配置
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
重启ssh服务即可
systemctl restart sshd