The rate of requests per second on an SSH server can be configured by modifying the MaxStartups parameter in the sshd\_config file. MaxStartups determines the maximum number of concurrent unauthenticated connections to the SSH server.
The MaxStartups parameter can be set in the sshd\_config file by modifying the following line:
#MaxStartups 10:30:60
The MaxStartups parameter defines the maximum connections allowed in the format of:
MaxStartups start:rate:full
- start: The number of connection attempts allowed in the maximum start period, which is by default 10 seconds. If the number of connection attempts exceeds this limit, then the connection is rejected.
- rate: It defines the number of connection attempts that can be made after the initial start period, typically, 2 seconds.
- full: The maximum limit of the connections allowed after the rate period, which is 60 by default.
For example, if MaxStartups is set to MaxStartups 10:30:60, it means that the SSH server will allow ten connection requests every ten seconds, 30 connections every 2 seconds for each IP address, and a maximum of 60 unauthenticated connections in total.
By configuring MaxStartups, you can limit or throttle the rate of connection attempts to your SSH server, making it more secure against brute-force attacks or various hacking attempts.