We have encountered a very strange issue with OpenSSH on CentOS 5.2 (openssh-server-4.3p2-26.el5_2.1). On one of our hosts, the ssh sessions are being closed automatically for no apparent reason with the following message:
Read from remote host server.com: Connection reset by peer
Connection to server.com closed.
If we try and reconnect we get
ssh: connect to host server.com port 22: Connection refused
If we check the port, it shows its closed
PORT STATE SERVICE
22/tcp closed ssh
We have checked the following:
- iptables is stopped
- hosts.allow - no entries
- hosts.deny - no entries
- erased openssh
- re-installed openssh (used default sshd_config)
The port appears to close for like 5 mins, then re-opens again.
All the previous sessions then remains open on the system.
03:40:24 up 1:19, 4 users, load average: 0.17, 0.05, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 server2.com 02:41 56:02 0.01s 0.01s -bash
root pts/1 server2.com 02:25 53:13 0.00s 0.00s -bash
root pts/2 server2.com 03:07 11:56 0.01s 0.01s -bash
root pts/3 server2.com 03:40 0.00s 0.01s 0.00s w
We have run out of ideas and might rebuild the box soon.