Keep-Alive of SSH connections

Who constantly keeps numerous SSH connections open knows the problem. If you in a compound just not as active as it can happen that the connection breaks off. The reason for this are usually SSH-setting of the client and the SSH server. These detect some “inactivity” (no traffic on the lines going) and end the session.

To prevent this, there is a SSH option named keep-alive specifically located in /etc/ssh/ssh_config and is called:

ServerAliveInterval 5

The interval refers to seconds. In this case, every 5 seconds a keep-alive through the SSH tunnel shipped to signal an activity.

Leave a Reply

Your email address will not be published. Required fields are marked *


*