Super User is a question and answer site for computer enthusiasts and power users. 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

On this particular server, it seems that it's configured somehow to close a session if there is no activity after a few minutes. I'm looking for a good way to prevent it from timing out via my setup of sshing to a primary server using PuTTY for which I have 'sending of null packets to keep session active set to 10 which keeps the session up without issue. I then run gnu screen on the host and ssh out to other machines. It is from these latter machines that I become disconnected. I have tried a few ssh options in my client but I don't think any of them seem to have worked. Whatever mechanism PuTTY uses does seem to work however.

Any ideas are appreciated. I prefer to keep one PuTTY window open than fooling around with multiple windows on my desktop. I'm also not interested in PuTTY Connection Manager either as it is buggy and very slow.

share|improve this question
For reference, this is the specific message: timed out waiting for input: auto-logout – chriskirk Jul 19 '11 at 14:46
I think I found it. It is the $TMOUT variable being set in /etc/profile. I overrode it in ~/.bash_profile and it looks like it might be working. – chriskirk Jul 19 '11 at 15:10
Good find. You should post it as an answer and accept it (it will let you after 24 hours) in order to close the question. – jáquer Jul 19 '11 at 15:49

Personally I have my screen session include the local clock in the status bar. That updates once a second, which works as a keep-alive.

My status bar in .screenrc looks like:

hardstatus alwayslastline
hardstatus string '%H %{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
share|improve this answer
Well that will only prevent my putty connection to the first machine from timing out which already doesn't timeout. I don't nest screens so I need this to work purely on the ssh/bash level. – chriskirk Jul 19 '11 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .