From e36111df7f5115cda0784cb5a40d368163ffaab1 Mon Sep 17 00:00:00 2001 From: Markus Frei Date: Fri, 13 Nov 2026 09:52:52 +0100 Subject: [PATCH] feat(roles/sshd)!: make MaxStartups configurable, default to 10:30:60 (fix #723) sshd uses the first value it reads, so a MaxStartups in sshd__raw no longer takes effect. Verified with the new sshd Molecule scenario on Debian 12/13, Rocky 8/9/10 and Ubuntu 22.04/24.04/26.04. --- CHANGELOG.md | 1 + extensions/molecule/sshd/converge.yml | 2 ++ .../group_vars/systems_under_test.yml | 5 +++ extensions/molecule/sshd/inventory/hosts.yml | 18 ++++++++++ extensions/molecule/sshd/molecule.yml | 2 ++ extensions/molecule/sshd/verify.yml | 36 +++++++++++++++++++ roles/gitlab_ce/README.md | 1 + roles/sshd/README.md | 14 ++++++-- roles/sshd/defaults/main.yml | 10 ++++++ roles/sshd/meta/argument_specs.yml | 24 +++++++++++++ roles/sshd/tasks/main.yml | 25 +++++++++++++ .../templates/etc/ssh/Debian12-sshd_config.j2 | 4 +-- .../templates/etc/ssh/Debian13-sshd_config.j2 | 4 +-- .../templates/etc/ssh/RedHat-sshd_config.j2 | 4 +-- .../templates/etc/ssh/RedHat10-sshd_config.j2 | 4 +-- .../templates/etc/ssh/RedHat8-sshd_config.j2 | 4 +-- .../templates/etc/ssh/RedHat9-sshd_config.j2 | 4 +-- .../templates/etc/ssh/Ubuntu22-sshd_config.j2 | 4 +-- .../templates/etc/ssh/Ubuntu24-sshd_config.j2 | 4 +-- .../templates/etc/ssh/Ubuntu26-sshd_config.j2 | 4 +-- 20 files changed, 154 insertions(+), 20 deletions(-) create mode 100644 extensions/molecule/sshd/converge.yml create mode 100644 extensions/molecule/sshd/inventory/group_vars/systems_under_test.yml create mode 100644 extensions/molecule/sshd/inventory/hosts.yml create mode 100644 extensions/molecule/sshd/molecule.yml create mode 100644 extensions/molecule/sshd/verify.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e3a79603..ce1504738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking Changes +* **role:sshd, playbook:setup_basic**: sshd turns new connections away earlier while many logins are pending (`MaxStartups 10:30:60` instead of the OpenSSH default `10:30:100`), as the CIS Benchmarks require, and `MaxStartups` is configurable with `sshd__max_startups__host_var` / `sshd__max_startups__group_var`. A `MaxStartups` set through `sshd__raw` no longer takes effect, move it to the variable. Hosts with many simultaneous SSH logins need a higher value, for example `'100:30:200'` on GitLab hosts ([#723](https://github.com/Linuxfabrik/lfops/issues/723)). * **role:grav, playbook:setup_grav**: The code of Grav, its configuration, pages, plugins and themes belong to `root`, so a hole in Grav or a plugin can no longer plant code in the site. The web server only writes `assets`, `backup`, `cache`, `images`, `logs`, `tmp`, `user/accounts` and `user/data`, and only these keep the SELinux type `httpd_sys_rw_content_t`. Grav, its plugins and themes are updated as `root` by `grav-selfupgrade-.timer` and `grav-update-.timer`, which replace `grav-selfupgrade.timer` and `grav-update.timer`, so several Grav sites on one host are each updated. Run other `bin/gpm` commands with `grav-gpm ` instead of `sudo -u apache bin/gpm`, which now fails, and deploy content below `user/` as `root`. The role no longer installs the Admin Panel, which could not save anything anymore, and drops `grav__skip_admin` and `grav__users`; it lists the Admin Panel plugins still installed at the end of the play, for you to remove. The vHost no longer accepts `POST`, and `setup_grav` no longer sets the SELinux boolean `httpd_can_network_connect`, which keeps its current value. * **role:apache_httpd**: The `proxy` vHost template waits 30 instead of 5 seconds for the backend, so slower responses no longer end in a 502, and a hanging backend holds the connection longer. Set `conf_proxy_timeout: 5` on the vHost to keep the previous value. * **role:icingaweb2, playbook:setup_icinga2_master**: IcingaWeb2 accepts selections of up to 500 objects and has 5 minutes for long requests such as PDF exports. A reverse proxy in front of it needs `apache_httpd__conf_limit_request_field_size` and `apache_httpd__conf_limit_request_line` set to `131072` as well. diff --git a/extensions/molecule/sshd/converge.yml b/extensions/molecule/sshd/converge.yml new file mode 100644 index 000000000..de8ef22ae --- /dev/null +++ b/extensions/molecule/sshd/converge.yml @@ -0,0 +1,2 @@ +- name: 'Converge sshd playbook' + ansible.builtin.import_playbook: 'linuxfabrik.lfops.sshd' diff --git a/extensions/molecule/sshd/inventory/group_vars/systems_under_test.yml b/extensions/molecule/sshd/inventory/group_vars/systems_under_test.yml new file mode 100644 index 000000000..a5731c87d --- /dev/null +++ b/extensions/molecule/sshd/inventory/group_vars/systems_under_test.yml @@ -0,0 +1,5 @@ +# Neither the default of the role (10:30:60) nor the one of OpenSSH (10:30:100), so verify.yml +# can prove that the value from the inventory reaches sshd. The host variable has to win over +# the group variable. +sshd__max_startups__group_var: '20:30:120' +sshd__max_startups__host_var: '100:30:200' diff --git a/extensions/molecule/sshd/inventory/hosts.yml b/extensions/molecule/sshd/inventory/hosts.yml new file mode 100644 index 000000000..de53d25f4 --- /dev/null +++ b/extensions/molecule/sshd/inventory/hosts.yml @@ -0,0 +1,18 @@ +# yamllint disable rule:empty-values + +# Map the playbook's target group (playbooks/sshd.yml: hosts: lfops_sshd) onto the +# shared systems_under_test host set. +lfops_sshd: + children: + systems_under_test: + +systems_under_test: + hosts: + debian12-vm: + debian13-vm: + rocky8-vm: + rocky9-vm: + rocky10-vm: + ubuntu2204-vm: + ubuntu2404-vm: + ubuntu2604-vm: diff --git a/extensions/molecule/sshd/molecule.yml b/extensions/molecule/sshd/molecule.yml new file mode 100644 index 000000000..7865cb7cb --- /dev/null +++ b/extensions/molecule/sshd/molecule.yml @@ -0,0 +1,2 @@ +# Molecule scenario marker for the 'sshd' scenario, run with +# `molecule test --scenario-name sshd`. diff --git a/extensions/molecule/sshd/verify.yml b/extensions/molecule/sshd/verify.yml new file mode 100644 index 000000000..7925b14be --- /dev/null +++ b/extensions/molecule/sshd/verify.yml @@ -0,0 +1,36 @@ +- name: 'Verify the sshd role configured sshd' + hosts: 'systems_under_test' + gather_facts: false + tasks: + + - name: 'Gather the distribution facts' + ansible.builtin.setup: + gather_subset: + - '!all' + + - name: 'Gather the service facts' + ansible.builtin.service_facts: # yamllint disable-line rule:empty-values + + # The daemon unit is ssh.service on Debian and Ubuntu, sshd.service on the Red Hat family. + - name: 'Assert that the sshd service is running and enabled' + ansible.builtin.assert: + that: + - 'ansible_facts["services"][__molecule__sshd_unit]["state"] == "running"' + - 'ansible_facts["services"][__molecule__sshd_unit]["status"] == "enabled"' + fail_msg: '{{ ansible_facts["services"][__molecule__sshd_unit] | to_json }}' + vars: + __molecule__sshd_unit: '{{ (ansible_facts["os_family"] == "Debian") | ternary("ssh.service", "sshd.service") }}' + + # Ask sshd for its effective configuration instead of reading the file: sshd uses the first + # value it reads, so a drop-in of the distribution that sets the option would win over the + # deployed sshd_config and pass a file check. + - name: 'sshd -T' + ansible.builtin.command: 'sshd -T' + changed_when: false + register: '__molecule__sshd_effective_config_result' + + - name: 'Assert that sshd uses the MaxStartups of the host variable' + ansible.builtin.assert: + that: + - '"maxstartups 100:30:200" in __molecule__sshd_effective_config_result["stdout_lines"]' + fail_msg: '{{ __molecule__sshd_effective_config_result["stdout_lines"] | select("search", "^maxstartups") | list }}' diff --git a/roles/gitlab_ce/README.md b/roles/gitlab_ce/README.md index 141cee23e..ebf45c755 100644 --- a/roles/gitlab_ce/README.md +++ b/roles/gitlab_ce/README.md @@ -12,6 +12,7 @@ This role installs and configures [GitLab CE](https://about.gitlab.com/), includ ## How the Role Behaves * `gitlab-dump.service` runs with `Nice=19`, best-effort IO priority 7 and `CPUWeight=` / `IOWeight=` of `20` (systemd default: `100`), so the dump does not slow down the application on a busy host. The weights only take effect under contention. `IOWeight=` only has an effect on block devices that use the BFQ IO scheduler; with `none` or `mq-deadline`, as on a RHEL 9 VM with virtio disks, it is ignored. +* The role does not configure sshd. Git over SSH opens one connection per `git fetch` or `git push`, so CI jobs or scripts that update many repositories at once exceed the `MaxStartups` of the [sshd](https://github.com/Linuxfabrik/lfops/tree/main/roles/sshd) role, and sshd refuses some of them. Set `sshd__max_startups__group_var: '100:30:200'` for GitLab hosts in the inventory, the value the [GitLab documentation](https://docs.gitlab.com/topics/git/troubleshooting_git/) suggests. ## Known Limitations diff --git a/roles/sshd/README.md b/roles/sshd/README.md index a66d33cd6..ffff5f3e8 100644 --- a/roles/sshd/README.md +++ b/roles/sshd/README.md @@ -1,6 +1,6 @@ # Ansible Role linuxfabrik.lfops.sshd -This role deploys `/etc/ssh/sshd_config` for [OpenSSH](https://www.openssh.com/) (the standard SSH server on Linux). It exposes the most commonly tuned options as variables (port, address family, password / GSSAPI / root login, log level, forwarding, session limits, sftp subsystem) plus a `sshd__raw` escape hatch for `Match` blocks etc. +This role deploys `/etc/ssh/sshd_config` for [OpenSSH](https://www.openssh.com/) (the standard SSH server on Linux). It exposes the most commonly tuned options as variables (port, address family, password / GSSAPI / root login, log level, forwarding, session and connection limits, sftp subsystem) plus a `sshd__raw` escape hatch for `Match` blocks etc. Note that the role templates the full `sshd_config`, since not all options can be overwritten in `/etc/ssh/sshd_config.d/` (e.g. `Subsystem 'sftp' already defined`). The only exception is `00-linuxfabrik.conf` on RHEL 9 and newer, which sets `GSSAPIAuthentication` and `X11Forwarding`, as the `50-redhat.conf` of the package would win otherwise. @@ -12,12 +12,14 @@ The option descriptions below are condensed from `sshd_config(5)`. ## How the Role Behaves -The role ships hardened defaults for several options that differ from the OpenSSH (or distribution) defaults: root may not log in, `X11Forwarding`, agent forwarding and TCP keepalives are off, `MaxAuthTries` and `ClientAliveCountMax` are stricter, an unresponsive client is disconnected after `ClientAliveInterval` × `ClientAliveCountMax` seconds (30 by default), and `LogLevel` is `VERBOSE` (which logs the key fingerprint used for each login). These follow the CIS Benchmarks. Each is overridable via the variables below. +The role ships hardened defaults for several options that differ from the OpenSSH (or distribution) defaults: root may not log in, `X11Forwarding`, agent forwarding and TCP keepalives are off, `MaxAuthTries`, `MaxStartups` and `ClientAliveCountMax` are stricter, an unresponsive client is disconnected after `ClientAliveInterval` × `ClientAliveCountMax` seconds (30 by default), and `LogLevel` is `VERBOSE` (which logs the key fingerprint used for each login). These follow the CIS Benchmarks. Each is overridable via the variables below. `PermitRootLogin` defaults to `no`. Before it deploys `sshd_config`, the role checks which user Ansible logs in as over SSH. If that is root and `sshd__permit_root_login` does not admit root logins with a key, the run aborts before anything is changed, since the reload would lock Ansible out of the host. Log in as an unprivileged user with sudo (see the [login](https://github.com/Linuxfabrik/lfops/tree/main/roles/login) role), or set `sshd__permit_root_login: 'prohibit-password'` for hosts that Ansible has to reach as root. `MaxAuthTries` defaults to `3`. Every public key an SSH agent offers counts as one attempt, so a client with more than three keys loaded in its agent may be rejected before the matching key is tried. In that case use `IdentitiesOnly yes` / an explicit `IdentityFile` on the client, or raise `sshd__max_auth_tries`. +`MaxStartups` defaults to `10:30:60`. It limits the connections that have not authenticated yet, across all clients: from 10 such connections on, sshd refuses every new one with a probability of 30%, rising to 100% at 60. A host that many clients log in to at the same moment, such as a Git server with CI jobs, reaches this limit with legitimate logins, which then fail before authentication (`Connection closed by remote host` or `Not allowed at this time` on the client, `drop connection ... past MaxStartups` in the log of sshd). Raise `sshd__max_startups__host_var` / `sshd__max_startups__group_var` on such hosts. sshd uses the first value it reads, so a `MaxStartups` in `sshd__raw` has no effect. + On Debian and Ubuntu the SSH daemon unit is `ssh.service` and OpenSSH ships socket activation (`ssh.socket`) enabled by default. The role manages the daemon through its service unit like on Red Hat, so on these systems it disables and stops `ssh.socket` and enables `ssh.service` instead. Red Hat-family systems for which no version-specific template exists (in particular Fedora) fall back to the generic `RedHat` template. @@ -98,6 +100,13 @@ Any [LFOps playbook](https://github.com/Linuxfabrik/lfops/blob/main/playbooks/RE * Type: Number. * Default: `10` +`sshd__max_startups__host_var` / `sshd__max_startups__group_var` + +* Maximum number of concurrent connections that have not authenticated yet, as `start:rate:full`: from `start` such connections on, sshd refuses a new one with a probability of `rate` percent, which rises linearly to 100% at `full`. A single number refuses every connection above it. See "How the Role Behaves". +* Type: String. +* Default: `'10:30:60'` +* Deviates from the upstream default `10:30:100`: fewer pending logins can keep sshd busy before it turns new ones away. The CIS Benchmarks require `10:30:60` or stricter. + `sshd__password_authentication` * Specifies whether password authentication is allowed. @@ -172,6 +181,7 @@ sshd__gssapi_authentication: false sshd__log_level__host_var: 'VERBOSE' sshd__max_auth_tries: 3 sshd__max_sessions: 10 +sshd__max_startups__host_var: '100:30:200' sshd__password_authentication: false sshd__permit_root_login: 'prohibit-password' sshd__port: 22 diff --git a/roles/sshd/defaults/main.yml b/roles/sshd/defaults/main.yml index 87289ea17..45aa70b8e 100644 --- a/roles/sshd/defaults/main.yml +++ b/roles/sshd/defaults/main.yml @@ -17,6 +17,16 @@ sshd__log_level__host_var: '' sshd__log_level__role_var: 'VERBOSE' sshd__max_auth_tries: 3 sshd__max_sessions: 10 +sshd__max_startups__combined_var: '{{ + sshd__max_startups__host_var if (sshd__max_startups__host_var | string | length) else + sshd__max_startups__group_var if (sshd__max_startups__group_var | string | length) else + sshd__max_startups__dependent_var if (sshd__max_startups__dependent_var | string | length) else + sshd__max_startups__role_var + }}' +sshd__max_startups__dependent_var: '' +sshd__max_startups__group_var: '' +sshd__max_startups__host_var: '' +sshd__max_startups__role_var: '10:30:60' # upstream default: 10:30:100 sshd__password_authentication: false sshd__permit_root_login: 'no' # upstream default: 'prohibit-password' sshd__port: 22 diff --git a/roles/sshd/meta/argument_specs.yml b/roles/sshd/meta/argument_specs.yml index fe88dd891..8b1320593 100644 --- a/roles/sshd/meta/argument_specs.yml +++ b/roles/sshd/meta/argument_specs.yml @@ -93,6 +93,30 @@ argument_specs: Maximum number of open shell, login or subsystem sessions permitted per network connection. + sshd__max_startups__dependent_var: + type: 'str' + required: false + default: '' + description: >- + Dependent-role override for `MaxStartups`. See + `sshd__max_startups__host_var` in the README. + + sshd__max_startups__group_var: + type: 'str' + required: false + default: '' + description: >- + Group-level override for `MaxStartups`. See + `sshd__max_startups__host_var` in the README. + + sshd__max_startups__host_var: + type: 'str' + required: false + default: '' + description: >- + Host-level override for `MaxStartups`. See + `sshd__max_startups__host_var` in the README. + sshd__password_authentication: type: 'bool' required: false diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index 692d05e24..e2470a062 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -6,6 +6,31 @@ - 'always' +- block: + + # sshd refuses to start with an invalid MaxStartups (servconf.c, `Invalid MaxStartups spec`), + # and the handler would only notice after sshd_config has been replaced. + - name: 'Check variable constraints' + ansible.builtin.assert: + that: + - 'sshd__max_startups__combined_var | string is match("^[0-9]+(:[0-9]+:[0-9]+)?$")' + - '__sshd__max_startups_parts[0] >= 1' + - '__sshd__max_startups_parts | length == 1 or ( + __sshd__max_startups_parts[0] <= __sshd__max_startups_parts[2] and + __sshd__max_startups_parts[1] >= 1 and + __sshd__max_startups_parts[1] <= 100 + )' + quiet: true + fail_msg: >- + sshd__max_startups must be a number or `start:rate:full` with start <= full and a rate + between 1 and 100, got "{{ sshd__max_startups__combined_var }}". + vars: + __sshd__max_startups_parts: '{{ sshd__max_startups__combined_var | string | split(":") | map("int") | list }}' + + tags: + - 'always' + + - name: 'Run the preflight checks' ansible.builtin.import_tasks: 'preflight.yml' diff --git a/roles/sshd/templates/etc/ssh/Debian12-sshd_config.j2 b/roles/sshd/templates/etc/ssh/Debian12-sshd_config.j2 index dd7e42ef0..8efc9089f 100644 --- a/roles/sshd/templates/etc/ssh/Debian12-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/Debian12-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -102,7 +102,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary("yes", "no") }} #PidFile /run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/Debian13-sshd_config.j2 b/roles/sshd/templates/etc/ssh/Debian13-sshd_config.j2 index cc02caa52..6094daf9d 100644 --- a/roles/sshd/templates/etc/ssh/Debian13-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/Debian13-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -104,7 +104,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary('yes', 'no') }} #PidFile /run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/RedHat-sshd_config.j2 b/roles/sshd/templates/etc/ssh/RedHat-sshd_config.j2 index c6d41002d..f9c255d8a 100644 --- a/roles/sshd/templates/etc/ssh/RedHat-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/RedHat-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ @@ -114,7 +114,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary("yes", "no") }} #PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/RedHat10-sshd_config.j2 b/roles/sshd/templates/etc/ssh/RedHat10-sshd_config.j2 index c6d41002d..f9c255d8a 100644 --- a/roles/sshd/templates/etc/ssh/RedHat10-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/RedHat10-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ @@ -114,7 +114,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary("yes", "no") }} #PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/RedHat8-sshd_config.j2 b/roles/sshd/templates/etc/ssh/RedHat8-sshd_config.j2 index 9009e9119..383fb0545 100644 --- a/roles/sshd/templates/etc/ssh/RedHat8-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/RedHat8-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ @@ -124,7 +124,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary("yes", "no") }} #PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/RedHat9-sshd_config.j2 b/roles/sshd/templates/etc/ssh/RedHat9-sshd_config.j2 index 61c768795..922431877 100644 --- a/roles/sshd/templates/etc/ssh/RedHat9-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/RedHat9-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ @@ -114,7 +114,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary("yes", "no") }} #PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/Ubuntu22-sshd_config.j2 b/roles/sshd/templates/etc/ssh/Ubuntu22-sshd_config.j2 index 1533c3a47..12120051a 100644 --- a/roles/sshd/templates/etc/ssh/Ubuntu22-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/Ubuntu22-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -104,7 +104,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary('yes', 'no') }} #PidFile /run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/Ubuntu24-sshd_config.j2 b/roles/sshd/templates/etc/ssh/Ubuntu24-sshd_config.j2 index 1533c3a47..12120051a 100644 --- a/roles/sshd/templates/etc/ssh/Ubuntu24-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/Ubuntu24-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -104,7 +104,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary('yes', 'no') }} #PidFile /run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none diff --git a/roles/sshd/templates/etc/ssh/Ubuntu26-sshd_config.j2 b/roles/sshd/templates/etc/ssh/Ubuntu26-sshd_config.j2 index cc02caa52..6094daf9d 100644 --- a/roles/sshd/templates/etc/ssh/Ubuntu26-sshd_config.j2 +++ b/roles/sshd/templates/etc/ssh/Ubuntu26-sshd_config.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -# 2026101601 +# 2026111301 # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -104,7 +104,7 @@ ClientAliveInterval {{ sshd__client_alive_interval }} ClientAliveCountMax {{ sshd__client_alive_count_max }} UseDNS {{ sshd__use_dns | bool | ternary('yes', 'no') }} #PidFile /run/sshd.pid -#MaxStartups 10:30:100 +MaxStartups {{ sshd__max_startups__combined_var }} #PermitTunnel no #ChrootDirectory none #VersionAddendum none