ty9919 发表于 2018-7-1 14:13:01

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.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 port 22.
  debug1: Connection established.

  debug1:>
  debug1:>
  debug1:>
  debug1:>  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
页: [1]
查看完整版本: ssh_exchange_identification: read: Connection reset by peer 报错解决办法