Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Red Hat Linux Enterprise Edition 5 on my box. Recently, I started experiencing issues with sshd not keeping connection and randomly disconnecting with my clients.

Ping works perfectly fine but port 22 is blocked randomly.

Has anyone faced this issue? What is the solution?

share|improve this question
up vote 1 down vote accepted

Get rid of the duplicate IP address on your network..... At least give me credit if I'm right... :)

share|improve this answer
Check your arp table and compare when it does work and when it does not. arp -a works on both windows and linux clients. – Leo Oct 20 '10 at 15:04
We have DHCP in place. My admin moved my machine to different network and i got new IP address. It solved the problem. – Nayn Oct 21 '10 at 11:32

When you say ping works perfectly, how many pings are you sending? It sounds like ssh is working "perfectly" for at least some of the time. You need to run a long ping test to catch any intermittent issues.

That way you can establish whether there is some network issue causing the problem, which seems more likely for an intermittent issue. Look for any patterns of time of day, or if it is specific clients disconnecting, while others work.

share|improve this answer
I tried ping -t <myhost>. It never skipped a packet. Very rarely the delay was odd >1ms. – Nayn Oct 20 '10 at 14:26

Put this into your sshd_config and kill/HUP your sshd process.

ClientAliveInterval 60
ClientAliveCountMax 5
share|improve this answer

Your Answer


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.