blob: 23472851b1aa3e20c73485db0f6c7e24564f881b (
plain)
1
2
3
4
5
6
7
8
9
10
|
- name: Accès uniquement par clé ssh
lineinfile: dest=/etc/ssh/sshd_config state=present backrefs=yes regexp="^PasswordAuthentication yes"
line="PasswordAuthentication no"
notify: restart sshd
- name: Décommenter option par défaut
lineinfile: dest=/etc/ssh/sshd_config state=present backrefs=yes
regexp="^#PermitRootLogin yes"
line="PermitRootLogin yes"
notify: restart sshd
|