Setting up idle timeout

The SSH daemon closes the connection from the server-side if the client goes silent. To prevent connection loss, instruct the SSH client to send a sign-of-life signal to the server once in a while.

  1. Open the SSH configuration file.

sudo nano /etc/ssh/sshd_config
  1. Set the value of TCPKeepAlive, ClientAliveInterval and ClientAliveCountMax options.

TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 3

Last updated