Update RHEL7 SSH connection alive interval

A short tutorial of updating ssh connection alive interval on redhat 7 enterprise linux server

To update ssh connection configuration on redhat 7, you can type below command to edit:

vi /etc/ssh/sshd_config

Update below combination to get desired connection alive interval

# Per CCE-27082-7: Set ClientAliveCountMax 0 in /etc/ssh/sshd_config
ClientAliveCountMax 0

# Per CCE-27433-2: Set ClientAliveInterval 300 in /etc/ssh/sshd_config
ClientAliveInterval 300

One you done the change, restart ssh service:

service sshd restart

Reference :

https://www.thegeekdiary.com/centos-rhel-how-to-setup-session-idle-timeout-inactivity-timeout-for-ssh-auto-logout/

Leave a Comment

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


The reCAPTCHA verification period has expired. Please reload the page.

Scroll to Top