Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Each time putty is breaking session after some time if I am doing nothing.

There is no any time parameter on putty so how can I stay my putty ssh session always Alive ?

share|improve this question
There is no solution to this problem. Putty is buggy software and requires an internet connection that has 100.00% uptime and 0.00% packet loss. – Eric Leschinski Oct 26 '14 at 17:52
up vote 10 down vote accepted

Another thing to check is if your system is setting the environment variable TMOUT. To check this you can just do:

env | grep TMOUT


echo $TMOUT

If it is set, you could change it or unset it. To change the value:

export TMOUT=3600

Where the number is the number of seconds until you get logged out. Otherwise unset it to turn off the feature:

unset TMOUT

Note, it may be that your system administrator has set this for security reasons. So if you are not the system administrator you may want to check this before changing anything yourself.

share|improve this answer

Try enabling keep-alives. This causes PuTTY to send SSH null packets to the remote host periodically, so that the session doesn't time out.

There are other things that can cause connections to drop, but this is worth a try. If it doesn't work, you'd need to look into these other things: VPN timeouts, router timeouts, settings changes on the remote SSH server, flaky connections, etc.

share|improve this answer
Alternatively run something that produces continuous output such as top when you are away. – LawrenceC Sep 6 '11 at 12:08
@ultrasawblade: That is a duct tape fix; it merely treats the symptom but does not address the true problem. – Kevin M Sep 7 '11 at 3:47
Please also specify where the option is. – rahilwazir Sep 24 '14 at 11:29

In addition to the other answers, I'd suggest running screen to be able to have session management even if putty does terminate (connection dying, vpn going down, etc.).

share|improve this answer

Check the following option in PuTTY:

enter image description here

share|improve this answer

Just run this on your putty this make sure, to activate your session for every 10-mins.

 while true; do date; sleep 600; done
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.