UCF STIG Viewer Logo

The SSH daemon must set a timeout interval on idle sessions.


Finding ID Version Rule ID IA Controls Severity
V-217996 RHEL-06-000230 SV-217996r505923_rule Low
Causing idle users to be automatically logged out guards against compromises one system leading trivially to compromises on another.
Red Hat Enterprise Linux 6 Security Technical Implementation Guide 2020-09-03


Check Text ( C-19477r377003_chk )
Run the following command to see what the timeout interval is:

# grep ClientAliveInterval /etc/ssh/sshd_config

ClientAliveInterval 900

If "ClientAliveInterval" has a value greater than "900", this is a finding.
Fix Text (F-19475r377004_fix)
SSH allows administrators to set an idle timeout interval. After this interval has passed, the idle user will be automatically logged out.

To set an idle timeout interval, edit the following line in "/etc/ssh/sshd_config" as follows:

ClientAliveInterval [interval]

The timeout [interval] is given in seconds. To have a timeout of 15 minutes, set [interval] to 900.

If a shorter timeout has already been set for the login shell, that value will preempt any SSH setting made here. Keep in mind that some processes may stop SSH from correctly detecting that the user is idle.