ssh连接失败,但能ping通服务器
问题描述
能ping通,ssh报错 “Connection reset by peer”
[root@yl-web ~]# ssh root@10.1.101.35
ssh_exchange_identification: read: Connection reset by peer
[root@yl-web ~]# ping 10.1.101.35
PING 10.1.101.35 (10.1.101.35) 56(84) bytes of data.
64 bytes from 10.1.101.35: icmp_seq=1 ttl=64 time=0.587 ms
64 bytes from 10.1.101.35: icmp_seq=2 ttl=64 time=0.722 ms
64 bytes from 10.1.101.35: icmp_seq=3 ttl=64 time=0.475 ms
问题排查
1.判断是否客户端本身问题
终端上输入 ssh -v 服务器的ip ,如果出现以下信息,则可以说明客户端正常,问题主要出在服务器端。
[root@yl-web ~]# ssh -v root@10.1.101.35
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration