SSH client idle timeout

Photo by Agê Barros on Unsplash

SSH client idle timeout

Leaving the SSH client idle for a few minutes and ends up getting a disconnected session. SSH server has configured a long idle timeout but still getting such disconnections.

Turns out we need to configure the SSH client as well, just put this into ~/.ssh/config:

Host *
  ServerAliveInterval 60
  ServerAliveCountMax 60

For all remote SSH host, we will be sending an alive signal every 60 seconds for a maximum of 60 times, which is equivalent to an hour