2

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.

3
  • 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/…
    – Zoredache
    Oct 16, 2014 at 21:30
  • are you saying that it's a timeout? I thought if that was the case the session would no longer be listed in "who" and it would give me a timeout message and drop me back in my local shell? Are you saying that isn't the case? Oct 16, 2014 at 21:36
  • It is typically a timeout in the NAT or state tracking feature of a firewall/router, not a timeout on the server/client. The state gets dropped breaking the connection, but no resets are sent to either the server or client. Enabling keepalives basically forces your client to send a small packet every minute or so, however you configure it. That way the client and server can know connection was interrupted.
    – Zoredache
    Oct 16, 2014 at 21:41

0

You must log in to answer this question.

Browse other questions tagged .