2021-04-15 16:03:35 +02:00
|
|
|
---
|
|
|
|
- name: Eddit pam config for ssh
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/pam.d/sshd
|
|
|
|
regexp: 'pam_oath.so'
|
|
|
|
line: "auth required pam_oath.so usersfile=/etc/users.oath window=60 digits=6"
|
|
|
|
insertbefore: BOF
|
|
|
|
|
|
|
|
- name: Set ChallengeResponseAuthentication in sshd conf
|
2021-04-15 16:24:51 +02:00
|
|
|
lineinfile:
|
2021-04-15 16:03:35 +02:00
|
|
|
path: /etc/ssh/sshd_config
|
|
|
|
regexp: '^#?ChallengeResponseAuthentication'
|
|
|
|
line: 'ChallengeResponseAuthentication yes'
|
2021-04-15 16:28:28 +02:00
|
|
|
notify: Reload sshd
|
2021-04-15 16:03:35 +02:00
|
|
|
|
|
|
|
- name: Set UsePAM in sshd conf
|
2021-04-15 16:24:51 +02:00
|
|
|
lineinfile:
|
2021-04-15 16:03:35 +02:00
|
|
|
path: /etc/ssh/sshd_config
|
|
|
|
regexp: '^#?UsePAM'
|
|
|
|
line: 'UsePAM yes'
|
2021-04-15 16:28:28 +02:00
|
|
|
notify: Reload sshd
|
2021-04-15 16:03:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|