aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/bootstrap/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/bootstrap/tasks/main.yml b/roles/bootstrap/tasks/main.yml
index 24f4c82..806902d 100644
--- a/roles/bootstrap/tasks/main.yml
+++ b/roles/bootstrap/tasks/main.yml
@@ -59,6 +59,14 @@
validate: "sshd -t -f %s"
notify: restart-sshd
+- name: SSH - disable password login
+ lineinfile:
+ path: /etc/ssh/sshd_config
+ regexp: "^#?PasswordAuthentication"
+ line: "PasswordAuthentication no"
+ validate: "sshd -t -f %s"
+ notify: restart-sshd
+
- name: SSH - disable empty password login
lineinfile:
path: /etc/ssh/sshd_config