Repository navigation
feat(roles/sshd)!: make MaxStartups configurable, default to 10:30:60 - #745
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #723
What changes
sshd__max_startups__host_var/sshd__max_startups__group_var(combined variable) setMaxStartupsin all ninesshd_configtemplates.10:30:60instead of the OpenSSH default10:30:100, as the CIS Benchmarks require. This is a breaking change and listed as such in the CHANGELOG.sshd_configif the value is not a number orstart:rate:fullwithstart <= fulland a rate between 1 and 100, the conditionsservconf.cchecks.MaxStartupsinsshd__rawno longer takes effect. README and CHANGELOG say so.gitlab_ceREADME recommendssshd__max_startups__group_var: '100:30:200'for GitLab hosts, the value GitLab's Git troubleshooting documentation suggests. It is set in the inventory, not injected byplaybooks/gitlab_ce.yml, sosetup_basicandsshdruns do not reset it.Deviation from the issue
The issue says the CIS impact section allows raising the value. The CIS Benchmarks for Rocky Linux 9 (v2.0.0) and Rocky Linux 10 (v1.0.0) have no impact section for this recommendation, they ask for
10:30:60or more restrictive. The README therefore only recommends raising the value on hosts with many legitimate logins and does not claim CIS covers it.Testing
New Molecule scenario
sshd: askssshd -Tfor the effectivemaxstartups, with a group and a host variable set so the host variable has to win, and checks that the daemon unit runs and is enabled.molecule test --scenario-name sshdpasses on Debian 12 and 13, Rocky 8, 9 and 10, Ubuntu 22.04, 24.04 and 26.04 (converge, verify, idempotence, verify).pre-commitandansible-lintpass.