Configure sshd

To prevent your idle ssh sessions from disconnecting prematurely, enable the ClientAliveInterval and ClientAliveCountMax settings in sshd_config(5). For example, to have sshd send messages to your ssh client up to 6 times every 15 seconds, add these two lines to /etc/ssh/sshd_config:

ClientAliveInterval 15
ClientAliveCountMax 6

Then have sshd reload its configuration file:

# pkill -HUP sshd