gdfgd 发表于 2015-8-25 09:26:55

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

   当你登录一台linux机器,登录不了,出现Connection reset by peer 报错,请参照以下解决步骤:   1、ssh -vvv -p22123.10.98.22
如:
localhost:~$ ssh -vvv -p22 123.10.98.22OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011debug1: Reading configuration data /etc/ssh_configdebug1: /etc/ssh_config line 20: Applying options for *debug2: ssh_connect: needpriv 0debug1: Connecting to 123.10.98.22 port 22.debug1: Connection established.debug1: identity file /.ssh/id_rsa type -1debug1: identity file /.ssh/id_rsa-cert type -1debug1: identity file /.ssh/id_dsa type -1debug1: identity file /.ssh/id_dsa-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_6.2ssh_exchange_identification: read: Connection reset by peer2、检查是否配置了访问控制
cat /etc/hosts.allow

sshd:192.168.1.*:allow
sshd:all:deny

发现这里是不允许123.10.98.22 来登录的,所以需要添加一条规则:
sshd:192.168.1.*:allowsshd:公司的出口IP:allow##这里的IP通过ip138.com可以查询。sshd:all:deny
页: [1]
查看完整版本: ssh_exchange_identification: read: Connection reset by peer 报错解决办法