SV-281296r1184670_rule
V-281296
SRG-OS-000163-GPOS-00072
RHEL-10-700930
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.
Note: This setting must be applied in conjunction with RHEL-10-700660 to function correctly.
In "/etc/ssh/sshd_config.d", create a drop file that will lexicographically precede 50-redhat.conf and add the following line:
ClientAliveInterval 600
Restart the SSH daemon with the following command for the changes to take effect:
$ sudo systemctl restart sshd.service
Verify RHEL 10 is configured with an SSH timeout interval.
Verify 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'
/etc/ssh/sshd_config.d/10-stig.conf::ClientAliveInterval 600
Verify the runtime setting with the following command:
$ sudo sshd -T | grep -i clientaliveinterval
clientaliveinterval 600
If the "ClientAliveInterval" keyword is not set to a value of "600" or less in a drop-in that lexicographically precedes 50-redhat.conf, or if no output is returned, this is a finding.
V-281296
False
RHEL-10-700930
Verify RHEL 10 is configured with an SSH timeout interval.
Verify 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'
/etc/ssh/sshd_config.d/10-stig.conf::ClientAliveInterval 600
Verify the runtime setting with the following command:
$ sudo sshd -T | grep -i clientaliveinterval
clientaliveinterval 600
If the "ClientAliveInterval" keyword is not set to a value of "600" or less in a drop-in that lexicographically precedes 50-redhat.conf, or if no output is returned, this is a finding.
M
5733