SSH/Keepalive

Add this to /etc/ssh/sshd_config:

KeepAlive yes
ClientAliveInterval 30
ClientAliveCountMax 999999