You've already forked ssh-protect
feat: added set i attr in authorized_keys file
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
---
|
||||
- name: Delete i attr from authorized_keys file
|
||||
ansible.builtin.file:
|
||||
path: /root/.ssh/authorized_keys
|
||||
attr: '-i'
|
||||
|
||||
- name: Write ssh keys
|
||||
template:
|
||||
src: "authorized_keys.j2"
|
||||
dest: "/root/.ssh/authorized_keys"
|
||||
mode: 0600
|
||||
|
||||
- name: Set i attr from authorized_keys file
|
||||
ansible.builtin.file:
|
||||
path: /root/.ssh/authorized_keys
|
||||
attr: 'i'
|
||||
|
||||
- name: Authentication method public key only
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
|
||||
Reference in New Issue
Block a user