Monday, February 5, 2018

Increasing ssh timeout

sudo vi /etc/ssh/sshd_config

Make sure it has following two properties at the end.

ClientAliveInterval 120
ClientAliveCountMax 720

Restart ssh daemon.

sudo service ssh restart

The first one configures the server to send null packets to clients every 120 seconds and the second one configures the server to close the connection if the client has been inactive for 720 intervals that are 720*120 = 86400 seconds = 24 hours

No comments:

Post a Comment