From 4a839b51c24a6587f498272e0d26041404577d90 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Thu, 27 Feb 2020 18:00:18 +0100 Subject: debian: sshd: set PermitRootLogin no --- roles/debian/tasks/sshd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/debian/tasks/sshd.yml b/roles/debian/tasks/sshd.yml index c342604..03f3279 100644 --- a/roles/debian/tasks/sshd.yml +++ b/roles/debian/tasks/sshd.yml @@ -29,9 +29,11 @@ regexp: '{{ item.regexp }}' line: '{{ item.line }}' with_items: + - regexp: '^[# ]*PermitRootLogin' + line: 'PermitRootLogin no' - regexp: '^[# ]*PasswordAuthentication' line: 'PasswordAuthentication no' - - regexp: '^#*GSSAPIAuthentication' + - regexp: '^[# ]*GSSAPIAuthentication' line: 'GSSAPIAuthentication no' notify: restart sshd -- cgit v1.2.1