Check: RHEL-07-040320
RHEL 7 STIG:
RHEL-07-040320
(in versions v3 r15 through v3 r12)
Title
The Red Hat Enterprise Linux operating system must be configured so that all network connections associated with SSH traffic are terminated after 10 minutes of becoming unresponsive. (Cat II impact)
Discussion
Terminating an unresponsive SSH session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle SSH session will also free up resources committed by the managed network element. Terminating network connections associated with communications sessions includes, for example, deallocating associated TCP/IP address/port pairs at the operating system level and deallocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean the operating system terminates all sessions or network access; it only ends the unresponsive session and releases the resources associated with that session. Satisfies: SRG-OS-000163-GPOS-00072, SRG-OS-000279-GPOS-00109
Check Content
Verify the SSH server automatically terminates a user session after the SSH client has been unresponsive for 10 minutes. Check for the value of the "ClientAliveInterval" keyword with the following command: # grep -iw clientaliveinterval /etc/ssh/sshd_config ClientAliveInterval 600 If "ClientAliveInterval" is not configured, is commented out, or has a value of "0", this is a finding. If "ClientAliveInterval" has a value that is greater than "600" and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Fix Text
Note: This setting must be applied in conjunction with RHEL-07-040340 to function correctly. Configure the SSH server to terminate a user session automatically after the SSH client has been unresponsive for 10 minutes. Add the following line (or modify the line to have the required value) to the "/etc/ssh/sshd_config" file (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): ClientAliveInterval 600 The SSH service must be restarted for changes to take effect.
Additional Identifiers
Rule ID: SV-204587r970703_rule
Vulnerability ID: V-204587
Group Title: SRG-OS-000163-GPOS-00072
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-001133 |
Terminate the network connection associated with a communications session at the end of the session or after an organization-defined time period of inactivity. |
CCI-002361 |
Automatically terminate a user session after organization-defined conditions or trigger events requiring session disconnect. |