Preventing session timeout via ssh/bash/screen/etc

bashdisplayputtysshtimeout

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.

Best Answer

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%{-}'
Related Question