Skip to content
Snippets Groups Projects
main.yml 499 B
- 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