diff --git a/roles/sshd/tasks/authentication.yml b/roles/sshd/tasks/authentication.yml index 192a53f..7bda62e 100644 --- a/roles/sshd/tasks/authentication.yml +++ b/roles/sshd/tasks/authentication.yml @@ -7,6 +7,9 @@ - { regexp: '^#?\s*PermitEmptyPasswords\s+', line: 'PermitEmptyPasswords no' } - { regexp: '^#?\s*ChallengeResponseAuthentication\s+', line: 'ChallengeResponseAuthentication {{ sshd_challenge_response_auth | ternary("yes", "no") }}' } - { regexp: '^#?\s*GSSAPIAuthentication\s+', line: 'GSSAPIAuthentication {{ sshd_gss_api_auth | ternary("yes", "no") }}' } + - { regexp: '^#?IgnoreRhosts', line: 'IgnoreRhosts yes' } + - { regexp: '^#?\s*KbdInteractiveAuthentication\s+', line: 'KbdInteractiveAuthentication no' } + - { regexp: '^#?\s*HostbasedAuthentication\s+', line: 'HostbasedAuthentication no' } - { regexp: '^#?\s*AuthenticationMethods\s+', line: "{{ 'AuthenticationMethods publickey password' if sshd_password_auth else 'AuthenticationMethods publickey' }}" diff --git a/roles/sshd/tasks/restrictions.yml b/roles/sshd/tasks/restrictions.yml index 5186ba8..655b77b 100644 --- a/roles/sshd/tasks/restrictions.yml +++ b/roles/sshd/tasks/restrictions.yml @@ -4,9 +4,6 @@ - { regexp: '^#?Protocol\s+', line: 'Protocol 2' } - { regexp: '^#?\s*PermitRootLogin\s+', line: 'PermitRootLogin no' } - { regexp: '^#?X11Forwarding', line: 'X11Forwarding no' } - - { regexp: '^#?IgnoreRhosts', line: 'IgnoreRhosts yes' } - - { regexp: '^#?\s*KbdInteractiveAuthentication\s+', line: 'KbdInteractiveAuthentication no' } - - { regexp: '^#?\s*HostbasedAuthentication\s+', line: 'HostbasedAuthentication no' } - { regexp: '^#?\s*PermitUserEnvironment\s+', line: 'PermitUserEnvironment no' } - { regexp: '^#?\s*AllowAgentForwarding\s+', line: 'AllowAgentForwarding {{ sshd_allow_agent_forwarding | ternary("yes", "no") }}' } - { regexp: '^#?\s*AllowTcpForwarding\s+', line: 'AllowTcpForwarding {{ sshd_allow_tcp_forwarding | ternary("yes", "no") }}' }