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'm using SSH to connect to my server. Often my connection becames inactive after some time: 10 minutes, 5 minutes or even sometimes in 10 seconds. And it return to live after waiting (3-5 minutes)

What are the reasons of this behavior and how can I beat it?


share|improve this question
up vote 5 down vote accepted

There are a couple of ways to resolve this:

On the server, login as root and edit /etc/ssh/sshd_config and add the line:

ClientAliveInterval 60

The other way, and easier and safer way is for your desktop machine to send those keep alive messages. As root on your desktop (or client) machine, edit /etc/ssh/ssh_config and add the line:

ServerAliveInterval 60


share|improve this answer
cool. I'll try it now – fl00r Feb 11 '11 at 16:26

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.