SV-260528r1208803_rule
V-260528
SRG-OS-000163-GPOS-00072
UBTU-22-255035
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 UBTU-22-255040 to function correctly.
Add or modify the following line in the "/etc/ssh/sshd_config" file:
ClientAliveInterval 600
Restart SSH for the changes to take effect:
$ sudo systemctl restart ssh
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 or is not set to a value of "600" or less, conflicting results are returned, or it is commented out or missing, this is a finding.
V-260528
False
UBTU-22-255035
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 or is not set to a value of "600" or less, conflicting results are returned, or it is commented out or missing, this is a finding.
M
5594