Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

3 Answers 3

up vote 4 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

or

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
1  
Alternatively run something that produces continuous output such as top when you are away. –  ultrasawblade Sep 6 '11 at 12:08
1  
@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

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

Your Answer

 
discard

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.