SSH Hangs

Hi Freinds,

I'm using Redhat 4.5 64 bits. I use ssh for remote management. Currently i'm facing an issue regarding ssh hang. In my system ssh server gets hang after 1 hours and then i need to restart the service again for that i need to access system physically.
Please provide me some solution to avoid hang of ssh server.

Who is Participating?
have to say this is new to me


in sshd_config file

turn on the log level to debug3

then restart the sshd daemon

, its should log everything

also : check , /var/log/kern    : for any kernel related log or error
also dmesg  , see there is any error

also, when you said, sshd hang, does sshd daemon process running or its dies ??? or its running but does not response ???

you said , after 1 hour?? did you time it?? is this always after 1 hour???

is there any error log in /var/log/messages ???

ujjwal-singhAuthor Commented:
not always after 1 hrs . I mean after sometimes.
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!


have you checked , log files ???

also have you checked any performance issue of this server ???

SSH doesnt like long gaps in network connectivity, if you lose a large enough sequence of packets, SSH is going to drop or cease responding.

the SSH client is incredibly stable, so unless there's something very odd going on, I'd investigate your packet loss to the destination..  If there is packet loss, consider tuning your network stack..maybe reduce the TCP window size so that less data goes across before there's an acknowledgement.
ujjwal-singhAuthor Commented:
i checked up the log files and didn't find any error in /var/log/message
here i'm talking about ssh server hang not about ssh client who gets disconnected after server mins of inactivity.
when i try ssh to that particular server it gives nothing or when i try telnet then it shows me blank screen instead of ssh version i.e what we expect from a healthy server.

also have you tryed to update sshd packages ???
also just have a look to this one

after enabling debug log in sshd_config.. see how its goes, what you see in their
is telnet configured for this server? are you able to login this server with that session? The reason behind this question is your server might facing issue with some other performance issue. you are looking only in ssh perspective.

after one hour Only ssh session hangs or whole server?

possiblities for server hang
1. server performance issue
2. space issue
3. application issue
First off all, you have not answered what I was asking you!!

if you look at your question, we were asking you to give us more feed back, but you were quite!! so how you expect us to help you!!! we cant read your mind, can we??

anyway ,

I had a similar problem few day ago with my VPs provider, its turned out, it their problem as you cant dump kernel to see what causing the probelem

if you would of answer what i was asking you, after that i would of tell you to use dump of kernel to see what causing

but you never answer!!!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.