解决 ssh_exchange_identification: read: Connection reset by peer问题

ssh连接主机时,出现如下报错如何解决?

在客户端连接服务端:

[root@foundation66 ~]# ssh root@172.25.254.166
ssh_exchange_identification: read: Connection reset by peer
## -v表示查看连接详细信息
[root@foundation66 ~]# ssh -v root@172.25.254.166

在这里插入图片描述
解决方案:在服务端更改配置文件

[root@localhost Desktop]# vi /etc/hosts.allow
#########################
sshd: ALL    ##允许所有ip主机均能连接本机

在这里插入图片描述

[root@localhost Desktop]# systemctl restart sshd

测试:

[root@foundation66 ~]# ssh root@172.25.254.166
Last login: Wed Jan  9 22:51:17 2019 from 172.25.254.66

版权声明:本文为lilygg原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。