linux disable ssh timeout

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.