Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Knowledge Set ssh keep-alive

Set ssh keep-alive

by Akaname last modified Jul 29, 2011 11:10 PM

This will setup your ssh client for automatic tcp keep-alive. However, keep-alive interval and timeout of the tcp connection can not be set up easily, because they are specified by the operating system.

ssh -o TCPKeepAlive=yes user@foo.com

A more flexible and reliable way is:

ssh -o ServerAliveInterval=120 user@foo.com

Which means, the ssh client sends a keep-alive message every 120 seconds.

See man ssh.

Akaname (垢嘗) licks it...

Sekien Akaname

Akaname is a long tongued japanese demon

Usually, it comes in the night to lick the mud out of the bathtub. Take care and don't forget to clean your bathtub properly!