mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
feat(ssh): allow configuring MaxStartups
This commit is contained in:
parent
f204f3036b
commit
b4c259dd1d
1 changed files with 18 additions and 0 deletions
|
@ -66,6 +66,24 @@
|
|||
notify: "reload sshd"
|
||||
tags: ["prepare", "prepare-sshd"]
|
||||
|
||||
- name: "Set maximum number of concurrent unauthenticated connections"
|
||||
ansible.builtin.lineinfile:
|
||||
<<: *sshd_config_args
|
||||
regexp: "^#?MaxStartups"
|
||||
line: "MaxStartups {{ sshd_config_max_startups }}"
|
||||
when: "sshd_config_max_startups is defined"
|
||||
notify: "reload sshd"
|
||||
tags: ["prepare", "prepare-sshd"]
|
||||
|
||||
- name: "Unset maximum number of concurrent unauthenticated connections"
|
||||
ansible.builtin.lineinfile:
|
||||
<<: *sshd_config_args
|
||||
regexp: "^#?MaxStartups"
|
||||
line: "#MaxStartups 10:30:100"
|
||||
when: "sshd_config_max_startups is not defined"
|
||||
notify: "reload sshd"
|
||||
tags: ["prepare", "prepare-sshd"]
|
||||
|
||||
- name: "Only allow SSHv2"
|
||||
ansible.builtin.lineinfile:
|
||||
<<: *sshd_config_args
|
||||
|
|
Loading…
Reference in a new issue