Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2.16: Correct variable name and required max value #67

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,8 @@ amzn2023cis_ssh_loglevel: INFO

## Control 4.2.16 - Ensure SSH MaxAuthTries is set to 4 or less
# This variable contains the maximum number of authentication attempts permitted
# per connection. This number should be 10 or less.
amzn2023cis_ssh_maxsauthtries: 4
# per connection. This number should be 4 or less.
amzn2023cis_ssh_maxauthtries: 4

## Control 4.2.18 - Ensure SSH MaxSessions is set to 10 or less
# This variable contains the maximum number of open sessions permitted
Expand Down
2 changes: 1 addition & 1 deletion tasks/section_4/cis_4.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
ansible.builtin.lineinfile:
path: "{{ item.path }}"
regexp: '^(#)?MaxAuthTries \d'
line: 'MaxAuthTries {{ amzn2023cis_ssh_maxsauthtries }}'
line: 'MaxAuthTries {{ amzn2023cis_ssh_maxauthtries }}'
validate: sshd -t -f %s
with_items:
- "{{ sshd_d_conf_files.files }}"
Expand Down