All network connections associated with SSH traffic must terminate after a period of inactivity.

From Red Hat Enterprise Linux 7 Security Technical Implementation Guide

Part of SRG-OS-000163-GPOS-00072

Associated with: CCI-001133 CCI-002361

SV-86865r3_rule All network connections associated with SSH traffic must terminate after a period of inactivity.

Vulnerability discussion

Terminating an idle 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, de-allocating associated TCP/IP address/port pairs at the operating system level and de-allocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean that the operating system terminates all sessions or network access; it only ends the inactive session and releases the resources associated with that session.Satisfies: SRG-OS-000163-GPOS-00072, SRG-OS-000279-GPOS-00109

Check content

Check the version of the operating system with the following command: # cat /etc/redhat-release If the release is 7.4 or newer this requirement is Not Applicable. Verify the operating system automatically terminates a user session after inactivity time-outs have expired. Check for the value of the "ClientAliveCountMax" keyword with the following command: # grep -i clientalivecount /etc/ssh/sshd_config ClientAliveCountMax 0 If "ClientAliveCountMax" is not set to "0" in "/etc/ ssh/sshd_config", this is a finding.

Fix text

Configure the operating system to automatically terminate a user session after inactivity time-outs have expired or at shutdown. 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): ClientAliveCountMax 0 The SSH service must be restarted for changes to take effect.

Pro Tips

Lavender hyperlinks in small type off to the right (of CSS class id, if you view the page source) point to globally unique URIs for each document and item. Copy the link location and paste anywhere you need to talk unambiguously about these things.

You can obtain data about documents and items in other formats. Simply provide an HTTP header Accept: text/turtle or Accept: application/rdf+xml.

Powered by sagemincer