Skip to main content
  1. Posts/

Disable SSH timeouts

··65 words·1 min·

To pretty much completely disable SSH timeouts, simply adjust the following directives in /etc/ssh/sshd_config:

TCPKeepAlive yes
ClientAliveInterval 30
ClientAliveCountMax 99999

EDIT: Once that’s changed, be sure to restart your ssh daemon.

SECURITY WARNING: If you remove users from your system, but they’re still connected via ssh, their connection may remain open indefinitely. Be sure to check all active ssh sessions after adjusting a user’s access.