SSH报错:ssh_exchange_identification: read: Connection reset by peer

迈不过友情╰ 2022-12-05 05:15 140阅读 0赞

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

  1. ssh root@172.25.254.160
  2. ssh_exchange_identification: read: Connection reset by peer

使用-v选项查看详细信息

  1. ## -v表示查看连接详细信息
  2. ssh -v root@172.25.254.160

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

  1. vi /etc/hosts.allow
  2. #########################
  3. sshd: ALL ##允许所有ip主机均能连接本机

同样可以这样配置:sshd: 172. 也就是172.网段下的主机都可以连接
在这里插入图片描述
重启网络服务:systemctl restart sshd
测试:

  1. ssh root@172.25.254.160
  2. Last login: Wed Jan 9 22:51:17 2019 from 172.25.254.66

发表评论

表情:
评论列表 (有 0 条评论,140人围观)

还没有评论,来说两句吧...

相关阅读