On Linux disable SSH timeouts
You’ll need to edit /etc/ssh/sshd_config and set these directives:
TCPKeepAlive yes ClientAliveInterval 30 ClientAliveCountMax 99999
To set SSH to disconnect if the user does not input anything for then hours:
TCPKeepAlive yes ClientAliveInterval 60 ClientAliveCountMax 600
Next restart sshd:
service sshd restart