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: Add variable for SSH MaxAuthTries #66

Merged
merged 1 commit into from
Mar 26, 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
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,11 @@ amzn2023cis_sshd:
# in legacy environments;
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

## Control 4.2.18 - Ensure SSH MaxSessions is set to 10 or less
# This variable contains the maximum number of open sessions permitted
# from a given connection. This number should be 10 or less.
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 4'
line: 'MaxAuthTries {{ amzn2023cis_ssh_maxsauthtries }}'
validate: sshd -t -f %s
with_items:
- "{{ sshd_d_conf_files.files }}"
Expand Down