5.1.19 Ensure sshd MaxSessions is configured

Information

The MaxSessions parameter specifies the maximum number of open sessions permitted from a given connection.

More information about the openSSH server configuration is available in the "Configure SSH Server" section overview.

To protect a system from denial of service due to a large number of concurrent sessions, use the rate limiting function of MaxSessions to protect availability of sshd logins and prevent overwhelming the daemon.

Solution

Create or edit a *.conf file in the /etc/ssh/sshd_config.d/ and set the MaxSessions parameter to 10 or less above any Include and Match entries as follows:

MaxSessions 10

Run the following command to apply the configuration change to the running sshd daemon without interrupting active sessions:

# systemctl reload sshd

See Also

https://workbench.cisecurity.org/benchmarks/27797

Item Details

Category: CONFIGURATION MANAGEMENT, IDENTIFICATION AND AUTHENTICATION

References: 800-53|CM-1, 800-53|CM-2, 800-53|CM-6, 800-53|CM-7, 800-53|IA-5

Plugin: Unix

Control ID: 4807340420fc3df92cdf65e8dd5a37538612a318e1e0d60a9d72fa5fa596b154