码迷,mamicode.com
首页 > 其他好文 > 详细

ssh_exchange_identification: read: Connection reset by peer 报错解决办法

时间:2015-08-25 12:32:03      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:ssh_exchange_identification: read: connection reset by peer 报错解决办法

     当你登录一台linux机器,登录不了,出现Connection reset by peer 报错,请参照以下解决步骤:

     1、ssh -vvv -p22  123.10.98.22  

如:

localhost:~$ ssh -vvv -p22 123.10.98.22

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011

debug1: Reading configuration data /etc/ssh_config

debug1: /etc/ssh_config line 20: Applying options for *

debug2: ssh_connect: needpriv 0

debug1: Connecting to 123.10.98.22 [123.10.98.22] port 22.

debug1: Connection established.

debug1: identity file /.ssh/id_rsa type -1

debug1: identity file /.ssh/id_rsa-cert type -1

debug1: identity file /.ssh/id_dsa type -1

debug1: identity file /.ssh/id_dsa-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_6.2

ssh_exchange_identification: read: Connection reset by peer

2、检查是否配置了访问控制

cat /etc/hosts.allow


sshd:192.168.1.*:allow

sshd:all:deny


发现这里是不允许123.10.98.22 来登录的,所以需要添加一条规则:

sshd:192.168.1.*:allow

sshd:公司的出口IP:allow  ##这里的IP通过ip138.com可以查询。

sshd:all:deny

本文出自 “任何事贵在坚持!” 博客,请务必保留此出处http://zhaowenlong51.blog.51cto.com/3231475/1687633

ssh_exchange_identification: read: Connection reset by peer 报错解决办法

标签:ssh_exchange_identification: read: connection reset by peer 报错解决办法

原文地址:http://zhaowenlong51.blog.51cto.com/3231475/1687633

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!