2
0

sshd.yml 465 B

12345678910111213141516171819202122
  1. - name: Backup sshd_config
  2. become: true
  3. copy:
  4. src: /etc/ssh/sshd_config
  5. dest: "{{ app_backup }}/etc_sshd_config"
  6. remote_src: yes
  7. backup: yes
  8. - name: Disable dns for sshd
  9. become: true
  10. lineinfile:
  11. path: /etc/ssh/sshd_config
  12. regexp: '^UseDNS '
  13. line: UseDNS no
  14. - name: Disable GSS api auth for sshd
  15. become: true
  16. lineinfile:
  17. path: /etc/ssh/sshd_config
  18. regexp: '^GSSAPIAuthentication '
  19. line: GSSAPIAuthentication no