fix: dropbear: Pull the ed25519 pubkey from $HOME, not /home/$USER
Also, pin the mode so it's never world-writable.
This commit is contained in:
parent
cf8514dab7
commit
ce468dc798
@ -25,9 +25,10 @@
|
|||||||
- name: Update authorized keys
|
- name: Update authorized keys
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/dropbear/authorized_keys
|
path: /etc/dropbear/authorized_keys
|
||||||
line: "{{ lookup('file', '/home/' + lookup('env', 'USER') + '/.ssh/id_ed25519.pub') }}"
|
line: "{{ lookup('file', lookup('env', 'HOME') + '/.ssh/id_ed25519.pub') }}"
|
||||||
state: present
|
state: present
|
||||||
create: yes
|
create: yes
|
||||||
|
mode: 644
|
||||||
|
|
||||||
- name: Disable Root password authentication
|
- name: Disable Root password authentication
|
||||||
uci:
|
uci:
|
||||||
|
Loading…
Reference in New Issue
Block a user