SSH timeout setting

edit /etc/ssh/sshd_config and add the following two lines:

ClientAliveInterval 300
ClientAliveCountMax 5

This will set up a heartbeat sent every 300 seconds (5 minutes) and allow 5 missed heartbeat response, so basically allow 25 minutes inactivity.

Reload the ssh for it to take effect.

sudo /etc/init.d/ssh reload

Leave a Comment

Before leaving a comment, please ensure you have read and understand my comments policy and my privacy policy. Any comment that does not abide by the comment policy will be deleted immediately.

Related Posts