I have been having this problem with several servers that I manage. I log in via SSH and leave my terminal window open for an hour or so while working on something else. When I bring the terminal window back up, I will still see the shell prompt on screen as if I am still logged in, but the session is totally unresponsive - when I type, I get no feedback in the terminal and I am forced to close the terminal window. When I open the terminal back up and log back in to the server, I run "who" and still see my old session in the list of logged in users:
me@server:~$ who
me pts/0 2014-10-16 11:43 (my.hostname) <- my original session
me pts/1 2014-10-16 13:41 (my.hostname) <- the new session
It is my understanding that if this was being caused by the SSH session timing out, that the session would no longer be listed in "who." It's also my understanding that if the session was timing out, I'd get some sort of error message telling me the connection was timed out/reset by the server and it should have dropped me back into my local shell, which isn't what happened. The session just becomes totally unresponsive. Does anyone know what might be causing this? I'd appreciate some input.
Thanks!
P.S. Just to clarify, my terminal software (the OS X terminal) is working perfectly fine. The software itself is still responsive when this happens, and all of my other terminal windows work fine.
for an hour or so while working on something else... but the session is totally unresponsive
- Configure keepalives on the server and/or clients. This answer deals with the client side. serverfault.com/questions/264108/…