migrate ssh config in system
This commit is contained in:
parent
dbd6c49507
commit
0593bc7705
@ -10,4 +10,5 @@
|
||||
pacman: update_cache=yes
|
||||
|
||||
- name: Restart sshd
|
||||
service: name=sshd state=restarted
|
||||
service: name=sshd state=restarted
|
||||
become: yes
|
||||
|
@ -31,3 +31,23 @@
|
||||
user: "{{user.name}}"
|
||||
key: "{{ keystodeploy|map(attribute='sshkey')|join('\n') }}"
|
||||
exclusive: true
|
||||
|
||||
|
||||
|
||||
- name : les connexions par mot de passe sont désactivées
|
||||
become: yes
|
||||
lineinfile :
|
||||
dest: /etc/ssh/sshd_config
|
||||
regexp: "^#?PasswordAuthentication"
|
||||
line: "PasswordAuthentication no"
|
||||
state: present
|
||||
notify: Restart sshd
|
||||
|
||||
- name: Remove root SSH access
|
||||
become: yes
|
||||
lineinfile:
|
||||
dest: /etc/ssh/sshd_config
|
||||
regexp: "^PermitRootLogin"
|
||||
line: "PermitRootLogin no"
|
||||
state: present
|
||||
notify: Restart sshd
|
||||
|
Loading…
Reference in New Issue
Block a user