11 lines
262 B
YAML
11 lines
262 B
YAML
|
---
|
||
|
- name: prohibit ssh login with password
|
||
|
become: yes
|
||
|
lineinfile:
|
||
|
path: /etc/ssh/sshd_config
|
||
|
regexp: '#PasswordAuthentication yes'
|
||
|
line: 'PasswordAuthentication no'
|
||
|
state: present
|
||
|
backrefs: yes
|
||
|
notify: restart_sshd
|