SV-275621r1147913_rule
V-275621
SRG-OS-000163-GPOS-00072
RIIM-OS-255030
CAT II
10
Configure the SSH server to terminate a user session automatically after the SSH client has been unresponsive for 10 minutes.
Note: This setting must be applied in conjunction with RIIM-OS-255040 to function correctly.
Add or modify the following line in the "/etc/ssh/sshd_config" file:
ClientAliveInterval 600
Restart the SSH daemon for the changes to take effect:
$ sudo systemctl restart sshd.service
Verify the SSH server automatically terminates a user session after the SSH client has been unresponsive for 10 minutes by using the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH 'clientaliveinterval'
/etc/ssh/sshd_config:ClientAliveInterval 600
If "ClientAliveInterval" does not exist, is not set to a value of "600" or less, if conflicting results are returned, is commented out, or is missing, this is a finding.
V-275621
False
RIIM-OS-255030
Verify the SSH server automatically terminates a user session after the SSH client has been unresponsive for 10 minutes by using the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH 'clientaliveinterval'
/etc/ssh/sshd_config:ClientAliveInterval 600
If "ClientAliveInterval" does not exist, is not set to a value of "600" or less, if conflicting results are returned, is commented out, or is missing, this is a finding.
M
5706