Skip to content
Snippets Groups Projects
Commit 60273bdb authored by Baptiste DE RENZO's avatar Baptiste DE RENZO
Browse files

Force ssh key for root login, Refs #37430

parent 16ae1b1f
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
- name: enable root login via ssh with key - name: enable root login via ssh with key
ansible.builtin.replace: ansible.builtin.replace:
dest: /etc/ssh/sshd_config dest: /etc/ssh/sshd_config
regexp: ^#PermitRootLogin (yes|without-password|prohibit-password) regexp: ^#?PermitRootLogin.*
replace: PermitRootLogin without-password replace: PermitRootLogin without-password
notify: restart sshd notify: restart sshd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment