Disable plaintext ssh auth.

This commit is contained in:
Brian Lee 2024-05-20 22:37:33 -07:00
parent 7b7466cd63
commit 355371af10

View File

@ -31,5 +31,13 @@
state: present state: present
notify: restart ssh notify: restart ssh
- name: Disable plaintext password authentication
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regex: 'PasswordAuthentication'
line: 'PasswordAuthentication no'
state: present
notify: restart ssh
- name: "Set up {{ ansible_os_family }}-based systems" - name: "Set up {{ ansible_os_family }}-based systems"
include_tasks: "setup-{{ ansible_os_family }}.yml" include_tasks: "setup-{{ ansible_os_family }}.yml"