When I use SSH on my debian server, after 3 minutes of idle, it disconnects.

Any way to raise that value to 4 hours ?



This isn't a Debian default setting, so someone, at some point, has configured the machine that way. Hence, you probably want to consult your organisation's documentation or your colleagues to determine who set it up, why, and how to change it.

On the (fairly reasonable) expectation that there's no documentation, you'll probably want to start with the TMOUT shell variable. That specifies the number of seconds of idle time to allow before closing the shell (and hence logging out of the SSH connection). It's the most likely source of timeouts.

There isn't actually an SSH-specific configuration parameter for idle timeout. You may have a network device that does some sort of "close down idle TCP connections" thing. I've seen them in action, but I still can't imagine why. Mostly they're just a pain in the behind.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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