SV-281269r1184769_rule
V-281269
SRG-OS-000163-GPOS-00072
RHEL-10-700660
CAT II
10
Configure RHEL 10 to automatically terminate all network connections associated with SSH traffic at the end of a session or after 10 minutes of inactivity.
In "/etc/ssh/sshd_config.d", create a drop file that will lexicographically precede 50-redhat.conf and add the following line:
ClientAliveCountMax 1
Restart the SSH daemon with the following command for the changes to take effect:
$ sudo systemctl restart sshd.service
Verify RHEL 10 network connections associated with SSH traffic terminate after becoming unresponsive.
Set the "ClientAliveCountMax" to "1" 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*clientalivecountmax'
/etc/ssh/sshd_config.d/10-stig.conf:ClientAliveCountMax 1
Verify the runtime setting with the following command:
$ sudo sshd -T | grep -i clientalivecountmax
clientalivecountmax 1
If the "ClientAliveCountMax" keyword is not set to a value of "1" in a drop-in that lexicographically precedes 50-redhat.conf, or if no output is returned, this is a finding.
V-281269
False
RHEL-10-700660
Verify RHEL 10 network connections associated with SSH traffic terminate after becoming unresponsive.
Set the "ClientAliveCountMax" to "1" 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*clientalivecountmax'
/etc/ssh/sshd_config.d/10-stig.conf:ClientAliveCountMax 1
Verify the runtime setting with the following command:
$ sudo sshd -T | grep -i clientalivecountmax
clientalivecountmax 1
If the "ClientAliveCountMax" keyword is not set to a value of "1" in a drop-in that lexicographically precedes 50-redhat.conf, or if no output is returned, this is a finding.
M
5733