aboutsummaryrefslogtreecommitdiff
path: root/roles/host/tasks/ssh-harden.yml
blob: 2df5bb2b330143bc869f96df2822ee804b0ae3fe (plain)
1
2
3
4
5
6
7
8
9
- name: Disable SSH password authentication
  ansible.builtin.lineinfile:
    dest: "/etc/ssh/sshd_config"
    regexp: "^PasswordAuthentication"
    line: "PasswordAuthentication no"
    state: "present"
    validate: "sshd -t -f %s"
  notify:
    - Restart sshd