I am having a strange problem with my CentOS 5.5 server. I use this server as a Xen host with 2 Xen guests.
The problem is that I am unable to connect to the server using SSH or VNC. Both SSH and VNC connection attempts result in a "Connection Reset by Peer" error. I can assure you there is no firewall which might be blocking the connections. I tried debugging SSHD by starting it in debug mode. Here's the output -
[root@xen ~]# /usr/sbin/sshd -d -p 22
debug1: sshd version OpenSSH_5.5p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-p'
debug1: rexec_argv[3]='22'
Set /proc/self/oom_adj from 0 to -17
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from xxx.xxx.xxx.xxx port 6792
Did not receive identification string from xxx.xxx.xxx.xxx
On the client side (Ubuntu 10.10) -
superman@my-pc:~$ ssh -vv [email protected]
OpenSSH_5.5p1 Debian-4ubuntu5, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server.host.name [server.host.name] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /home/superman/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/superman/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/superman/.ssh/id_rsa-cert type -1
debug1: identity file /home/superman/.ssh/id_dsa type -1
debug1: identity file /home/superman/.ssh/id_dsa-cert type -1
I'm also not able to SSH to any other server from the xen server.
[root@xen ~]# ssh my.other.server.ip
ssh_exchange_identification: read: Connection reset by peer
What might be wrong? I have KVM access to this server and I have tried removing all openssh packages completely and installing them again.
Update 1
As suggested by slashdot, I tried to connect with Public Key authentication turned off with same result -
superman@my-pc:~$ ssh -vvv -o PubkeyAuthentication=no server.host.name
OpenSSH_5.5p1 Debian-4ubuntu5, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server.host.name [ser.ver.ip.add] port 22.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/superman/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/superman/.ssh/id_rsa-cert type -1
debug1: identity file /home/superman/.ssh/id_dsa type -1
debug1: identity file /home/superman/.ssh/id_dsa-cert type -1
Please let me know if you need any other info.
Thank you for your time.
Update 2 -
I received a call from my data center that there was an issue with the router which was causing this problem. This problem is resolved now.
Thanks again to the community for their efforts.