diff options
Diffstat (limited to 'roles/host/tasks/ssh-harden.yml')
| -rw-r--r-- | roles/host/tasks/ssh-harden.yml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/host/tasks/ssh-harden.yml b/roles/host/tasks/ssh-harden.yml new file mode 100644 index 0000000..2df5bb2 --- /dev/null +++ b/roles/host/tasks/ssh-harden.yml @@ -0,0 +1,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 |
