SV-271710r1092596_rule
V-271710
SRG-OS-000163-GPOS-00072
OL09-00-002347
CAT II
10
Note: This setting must be applied in conjunction with ClientAliveCountMax" setting 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" or in a file in "/etc/ssh/sshd_config.d":
ClientAliveInterval 600
In order for the changes to take effect, the SSH daemon must be restarted.
$ sudo systemctl restart sshd.service
Verify that OL 9 is configured so that all network connections associated with SSH traffic are terminated after 10 minutes of becoming unresponsive.
Verify 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.
V-271710
False
OL09-00-002347
Verify that OL 9 is configured so that all network connections associated with SSH traffic are terminated after 10 minutes of becoming unresponsive.
Verify 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.
M
5680