SV-244525r1017331_rule
V-244525
SRG-OS-000163-GPOS-00072
RHEL-08-010201
CAT II
10
Note: This setting must be applied in conjunction with RHEL-08-010200 to function correctly.
Configure the SSH server to terminate a user session automatically after the SSH client has been unresponsive for 10 minutes.
Modify or append the following lines in the "/etc/ssh/sshd_config" file:
ClientAliveInterval 600
For the changes to take effect, the SSH daemon must be restarted.
$ sudo systemctl restart sshd.service
Verify the SSH server automatically terminates a user session after the SSH client has been unresponsive for 10 minutes.
Check that the "ClientAliveInterval" variable is set to a value of "600" or less by performing the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*clientaliveinterval'
ClientAliveInterval 600
If "ClientAliveInterval" does not exist, does not have a value of "600" or less in "/etc/ssh/sshd_config", or is commented out, this is a finding.
If conflicting results are returned, this is a finding.
V-244525
False
RHEL-08-010201
Verify the SSH server automatically terminates a user session after the SSH client has been unresponsive for 10 minutes.
Check that the "ClientAliveInterval" variable is set to a value of "600" or less by performing the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*clientaliveinterval'
ClientAliveInterval 600
If "ClientAliveInterval" does not exist, does not have a value of "600" or less in "/etc/ssh/sshd_config", or is commented out, this is a finding.
If conflicting results are returned, this is a finding.
M
2921