homeserver/roles/mgrote.deactivate_ssh_password_login/tasks/main.yml

11 lines
279 B
YAML
Raw Normal View History

2020-08-18 11:57:53 +02:00
---
- name: prohibit ssh login with password
become: yes
ansible.builtin.lineinfile:
2020-08-18 11:57:53 +02:00
path: /etc/ssh/sshd_config
regexp: '#PasswordAuthentication yes'
line: 'PasswordAuthentication no'
state: present
# backrefs: yes
2020-08-18 11:57:53 +02:00
notify: restart_sshd