Skip to content

Directive 'MaxStartups' is not allowed within a Match block #46

@bykvaadm

Description

@bykvaadm

Distro: OL10.1

Full log:
TASK [cis_rhel_10 : 5.1.17 | PATCH | Ensure sshd MaxStartups is configured] ***
==> fatal: [default]: FAILED! => {"changed": false, "msg": "failed to validate: rc:255 error:/root/.ansible/tmp/ansible-moduletmp-1769531761.8153517-acbl7cw7/tmprgikcg4a line 37: Directive 'MaxStartups' is not allowed within a Match block\r\n"}

task: "5.1.17 | PATCH | Ensure sshd MaxStartups is configured"

ansible.builtin.lineinfile:
path: "{{ rhel10cis_sshd_config_file }}"
regexp: (?i)^(#|)\s*MaxStartups
line: 'MaxStartups {{ rhel10cis_ssh_maxstartups }}'
validate: sshd -t -f %s
notify: Restart sshd

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions