解决 ssh_exchange_identification: read: Connection reset by peer问题
ssh连接主机时,出现如下报错如何解决?
在客户端连接服务端:
1 [root@foundation66 ~]# ssh root@172.25.254.166
2 ssh_exchange_identification: read: Connection reset by peer
1, -v表示查看连接详细信息
2, [root@foundation66 ~]# ssh -v root@172.25.254.166
解决方案:在服务端更改配置文件
1, [root@localhost Desktop]# vi /etc/hosts.allow
2, 加入下方第3条配置到文件中
3, sshd: ALL ##允许所有ip主机均能连接本机
1, [root@localhost Desktop]# systemctl restart sshd
测试
2, [root@foundation66 ~]# ssh root@172.25.254.166
3 ,Last login: Wed Jan 9 22:51:17 2019 from 172.25.254.66