Server Fault is a question and answer site for system and network administrators. 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

I have a Debian 6.0.1 vanilla install, and I use PUTTY to ssh into it. I will usually have 3 or 4 PUTTY login shells running at the same time.

What I'll find is that if I leave my computer for a couple of hours, I'll find that 1 out of 4 shells will be terminated. If it were a network issue, I would expect all 4 sessions to be down, but it's always just 1 or sometimes 2. It's really strange.

Would anyone know what this phenomenon is? Is there something in the logs I could use to figure out what is going on?

share|improve this question
up vote 2 down vote accepted

One thing to try is the keepalive feature in PuTTY.

If this resolves your issue, it means that you likely have a network device (e.g. firewall or NAT) between the two hosts that closes connections after a period of idleness. If it doesn't resolve your issue, it means there are network problems causing dropped packets between the the two hosts.

Try it out, and if it doesn't help please update your question with more details on the network between your two hosts.

share|improve this answer
Thank you, this worked! This is weird because on another system it doesn't drop my sessions after a certain time, but maybe it's a setting with sshd that I will need to investigate. – kjackson May 30 '11 at 14:55

maybe CTRL-Q will recover the shell: check here ->

Apparently CTRL+S actually does XOFF, which means the terminal will accept key strokes but won’t show the output of anything. It will appear as if your terminal is dead when it’s really just waiting to be turned back on. The fix? Simply press CTRL+Q to turn flow-control on (XON). If you pressed a whole bunch of keys before pressing CTRL+Q, you’ll see the output from those keystrokes.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.