Browse Source

Remove ssh root login with password

python3
Andrea Cimbalo 8 years ago
parent
commit
91c91f2360
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      roles/ssh_server/tasks/main.yaml

+ 7
- 0
roles/ssh_server/tasks/main.yaml View File

@ -111,6 +111,13 @@
regexp: '^TrustedUserCAKeys *' regexp: '^TrustedUserCAKeys *'
notify: restart ssh notify: restart ssh
- name: permit root login only with certificate
lineinfile:
line: 'PermitRootLogin without-password'
dest: '/etc/ssh/sshd_config'
regexp: '^PermitRootLogin *'
notify: restart ssh
- meta: flush_handlers - meta: flush_handlers
- name: "waiting for ssh on {{ ansible_docker_extra_args | default(inventory_hostname) }} to start" - name: "waiting for ssh on {{ ansible_docker_extra_args | default(inventory_hostname) }} to start"


Loading…
Cancel
Save