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.

Im connecting to a server using Putty. I have a connection time-out every 2 minutes if I don't use it. I don't have the same issue while connecting from my office network using the same laptop.

Settings changed:

Seconds between keepalives
share|improve this question
    
What value have you changed the "Seconds between keepalives" to, in PuTTy? –  EightBitTony Apr 28 at 13:00

2 Answers 2

up vote 0 down vote accepted

Check your SSH servers settings. It sounds like it's disconnecting you if there is inactivity after a set period of time. This are typically the settings you need to play with:

#TCPKeepAlive yes
#ClientAliveInterval 0
#ClientAliveCountMax 3

They're in the file /etc/ssh/sshd_config. These are commented out in my setup, you can check if they're un-commented and try commenting them out or changing their values.

share|improve this answer
    
Thanks..I dont have the same problem from my office network..Same laptop..same settings –  user1050619 Apr 28 at 12:56
    
@user1050619 - turn up the session logging in PuTTY to see why it's disconnecting you would be the next thing to look into. Also is there a firewall on your home network that you're passing through? –  slm Apr 28 at 13:28
    
After your changes it started working..Thanks.. –  user1050619 Apr 28 at 13:35

The server is probably not disconnecting you, it is most likely a router between you and your server, which explains why on different networks (especially the same network as the server) you don't have an issue.

You can fix this on the server side by adding TCPKeepAlive yes to your config (/etc/ssh/sshd_config on debian). Possibly you might need to mess with ClientAliveInterval as well if it's set to too high a value.

On the client side you can check Enable TCP keepalives (SO_KEEPALIVE option) under Connection in PuTTY (it is off by default).

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.