- 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