SV-238212r653811_rule
V-238212
SRG-OS-000126-GPOS-00066
UBTU-20-010036
CAT II
10
Configure the Ubuntu operating system to automatically terminate inactive SSH sessions after a period of inactivity.
Modify or append the following line in the "/etc/ssh/sshd_config" file, replacing "[Count]" with a value of 1:
ClientAliveCountMax 1
Restart the SSH daemon for the changes to take effect:
$ sudo systemctl restart sshd.service
Verify that all network connections associated with SSH traffic automatically terminate after a period of inactivity.
Verify the "ClientAliveCountMax" variable is set in the "/etc/ssh/sshd_config" file by performing the following command:
$ sudo grep -i clientalivecountmax /etc/ssh/sshd_config
ClientAliveCountMax 1
If "ClientAliveCountMax" is not set, is not set to "1", or is commented out, this is a finding.
V-238212
False
UBTU-20-010036
Verify that all network connections associated with SSH traffic automatically terminate after a period of inactivity.
Verify the "ClientAliveCountMax" variable is set in the "/etc/ssh/sshd_config" file by performing the following command:
$ sudo grep -i clientalivecountmax /etc/ssh/sshd_config
ClientAliveCountMax 1
If "ClientAliveCountMax" is not set, is not set to "1", or is commented out, this is a finding.
M
5318