Skip to content

Commit 87997bd

Browse files
committed
Add max_startup parameter
Signed-off-by: Emmanuel CARRE <[email protected]>
1 parent b8e9e40 commit 87997bd

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ override['ssh-hardening']['ssh']['server']['listen_to'] = node['ipaddress']
7070
* `['ssh-hardening']['ssh']['server']['use_privilege_separation']` - `nil` to calculate the best value based on server version, otherwise set `true` or `false`
7171
* `['ssh-hardening']['ssh']['server']['login_grace_time']` - `30s`. Time in which the login should be successfully, otherwise the user is disconnected.
7272
* `['ssh-hardening']['ssh']['server']['max_auth_tries']` - `2`. The number of authentication attempts per connection
73-
* `['ssh-hardening']['ssh']['server']['max_sessions']` - `10` The number of sessions per connection
73+
* `['ssh-hardening']['ssh']['server']['max_sessions']` - `10`. The number of sessions per connection
74+
* `['ssh-hardening']['ssh']['server']['max_startups']` - `10:30:100`. The maximum number of concurrent unauthenticated connections to the SSH daemon.
7475
* `['ssh-hardening']['ssh']['server']['password_authentication']` - `false`. Set to `true` if password authentication should be enabled
7576
* `['ssh-hardening']['ssh']['server']['log_level']` - `verbose`. The log level of sshd. See `LogLevel` in `man 5 sshd_config` for possible values.
7677
* `['ssh-hardening']['ssh']['server']['sftp']['enable']` - `false`. Set to `true` to enable the SFTP feature of OpenSSH daemon

attributes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
server['login_grace_time'] = '30s'
114114
server['max_auth_tries'] = 2
115115
server['max_sessions'] = 10
116+
server['max_startups'] = '10:30:100'
116117
server['password_authentication'] = false
117118
server['log_level'] = 'verbose'
118119
server['accept_env'] = ['LANG', 'LC_*', 'LANGUAGE']

templates/default/opensshd.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ PermitUserEnvironment no
9595
LoginGraceTime <%= @node['ssh-hardening']['ssh']['server']['login_grace_time'] %>
9696
MaxAuthTries <%= @node['ssh-hardening']['ssh']['server']['max_auth_tries'] %>
9797
MaxSessions <%= @node['ssh-hardening']['ssh']['server']['max_sessions'] %>
98-
MaxStartups 10:30:100
98+
MaxStartups <%= @node['ssh-hardening']['ssh']['server']['max_startups'] %>
9999

100100
# Enable public key authentication
101101
PubkeyAuthentication yes

0 commit comments

Comments
 (0)