|
|
|
@ -43,14 +43,14 @@
|
|
|
|
mode: 0644
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
|
|
|
|
- name: Disable password authentication for root.
|
|
|
|
- name: Disable password authentication for root.
|
|
|
|
lineinfile:
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/ssh/sshd_config
|
|
|
|
path: /etc/ssh/sshd_config
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
regexp: '^#?PermitRootLogin'
|
|
|
|
regexp: '^#?PermitRootLogin'
|
|
|
|
line: 'PermitRootLogin prohibit-password'
|
|
|
|
line: 'PermitRootLogin prohibit-password'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Disable password authentication for users.
|
|
|
|
- name: Disable password authentication for users.
|
|
|
|
lineinfile:
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/ssh/sshd_config
|
|
|
|
path: /etc/ssh/sshd_config
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
regexp: '^#?PasswordAuthentication'
|
|
|
|
regexp: '^#?PasswordAuthentication'
|
|
|
|
|