SV-269419r1050302_rule
V-269419
SRG-OS-000395-GPOS-00175
ALMA-09-040170
CAT II
10
To configure the SSH server to terminate a user session automatically after the SSH client has become unresponsive, add or modify the following lines in "/etc/ssh/sshd_config":
ClientAliveInterval 600
ClientAliveCountMax 1
Alternatively, add the settings to an include file if the line "Include /etc/ssh/sshd_config.d/*.conf" is found at the top of the "/etc/ssh/sshd_config" file:
$ cat << EOF | tee /etc/ssh/sshd_config.d/clientalive.conf
ClientAliveInterval 600
ClientAliveCountMax 1
EOF
Restart the SSH daemon for the settings to take effect:
$ systemctl restart sshd.service
Verify that the "ClientAliveInterval" variable is set to a value of "600" or less and "ClientAliveCountMax" is set to "1" by performing the following command:
$ sshd -T | grep clientalive
clientaliveinterval 600
clientalivecountmax 1
If "ClientAliveInterval" does not have a value of "600" or less, or "ClientAliveCountMax" is not set to "1", this is a finding.
V-269419
False
ALMA-09-040170
Verify that the "ClientAliveInterval" variable is set to a value of "600" or less and "ClientAliveCountMax" is set to "1" by performing the following command:
$ sshd -T | grep clientalive
clientaliveinterval 600
clientalivecountmax 1
If "ClientAliveInterval" does not have a value of "600" or less, or "ClientAliveCountMax" is not set to "1", this is a finding.
M
5664