Skip to content
Snippets Groups Projects
Commit 1d0cd20c authored by Chris Hines's avatar Chris Hines
Browse files

add a role that disables both password and challenge response

Former-commit-id: f31dc3c9
parent d07ddd7e
No related branches found
No related tags found
No related merge requests found
- name: "restart sshd"
service: name=sshd state=restarted
sudo: true
when: ansible_os_family == "RedHat"
- name: "restart ssh"
service: name=ssh state=restarted
sudo: true
when: ansible_os_family == "Debian"
- name: "Disable Challenge Response"
lineinfile:
args:
dest: /etc/ssh/sshd_config
regexp: "ChallengeResponseAuthentication yes"
line: "ChallengeResponseAuthentication no"
backrefs: yes
sudo: true
notify:
- restart sshd
- restart ssh
- name: "Disable Password"
lineinfile:
args:
dest: /etc/ssh/sshd_config
regexp: "PasswordAuthentication yes"
line: "PasswordAuthentication no"
backrefs: yes
sudo: true
notify:
- restart sshd
- restart ssh
- name: "Disable Challenge Response"
lineinfile:
args:
dest: /etc/ssh/sshd_config
regexp: "ChallengeResponseAuthentication yes"
line: "ChallengeResponseAuthentication no"
backrefs: yes
sudo: true
notify:
- restart sshd
- restart ssh
- name: "Disable Password"
lineinfile:
args:
dest: /etc/ssh/sshd_config
regexp: "PasswordAuthentication yes"
line: "PasswordAuthentication no"
backrefs: yes
sudo: true
notify:
- restart sshd
- restart ssh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment