Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 root@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 [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.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Can you check the permissions of /etc/libvirt directory and post its permissions.I read a similar problem with some one here http://www.mail-archive.com/ubuntu-server@lists.ubuntu.com/msg05019.html

Excerpts from above link

When this was not there I noticed surprisingly the ssh connections to the VMs after copying the
respective XML files back were dropping.By the time I wrote down this it was confirmed the backup I had permissions problem.

share|improve this answer
    
Thank you for your response but it seems like the link you gave is for SSH problem with guest VMs and not with the host itself. Anyway I tried that solution and the permissions on the files and they are correct. –  MaxZ Mar 9 '11 at 17:58
    
@MaxZ ok do one more thing login to the server but use an strace to find out which system call is actually killing that way you can monitor. on the host before logging in do an ssh stop and when you start it do some thing like strace service sshd start then login strace ssh root@(host in problem) –  Registered User Mar 10 '11 at 14:29
    
Sorry for not updating the question. I got a call from my data center that they had some issue with the switch which was causing the problem. It's working on now. Thanks again! –  MaxZ Mar 10 '11 at 16:49

Consider also trying without PubkeyAuthntication, just to make sure that there is not a key exchange issue i.e.:

ssh -o PubkeyAuthentication=no your_host_IP

share|improve this answer
    
No luck :( Updated the output in the question. –  MaxZ Mar 9 '11 at 22:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.