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/27798

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: 0444be7ad0047140f714c083c247944f06dbb1606a0ede4f0697d0be89252316