Skip to content

Commit

Permalink
Merge pull request dev-sec#149 from aeschbacher/master
Browse files Browse the repository at this point in the history
new parameter: ssh_max_startups
  • Loading branch information
rndmh3ro authored Jan 25, 2018
2 parents 063afd1 + e8be181 commit 7d53eea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
|`ssh_server_permit_environment_vars` | `false` | `true` to specify that ~/.ssh/environment and environment= options in ~/.ssh/authorized_keys are processed by sshd |
|`ssh_use_dns` | `false` | Specifies whether sshd should look up the remote host name, and to check that the resolved host name for the remote IP address maps back to the very same IP address. |
|`ssh_server_revoked_keys` | [] | a list of revoked public keys that the ssh server will always reject, useful to revoke known weak or compromised keys.|
|`ssh_max_startups` | '10:30:100' | Specifies the maximum number of concurrent unauthenticated connections to the SSH daemon.|

## Example Playbook

Expand Down
1 change: 1 addition & 0 deletions default_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@
options: ['StrictHostKeyChecking no']
ssh_use_dns: true
ssh_use_pam: true
ssh_max_startups: '10:30:60'
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ ssh_server_match_group: false # sshd

ssh_server_permit_environment_vars: false

# maximum number of concurrent unauthenticated connections to the SSH daemon
ssh_max_startups: '10:30:100' # sshd

ssh_ps53: 'yes'
ssh_ps59: 'sandbox'
Expand Down
2 changes: 1 addition & 1 deletion templates/opensshd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ UsePrivilegeSeparation {% if (ansible_distribution == 'Debian' and ansible_distr
LoginGraceTime 30s
MaxAuthTries {{ssh_max_auth_retries}}
MaxSessions 10
MaxStartups 10:30:100
MaxStartups {{ssh_max_startups}}

# Enable public key authentication
PubkeyAuthentication yes
Expand Down

0 comments on commit 7d53eea

Please sign in to comment.