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:
Martin Kennedy 2023-04-07 12:57:59 -04:00
parent cf8514dab7
commit ce468dc798

View File

@ -25,9 +25,10 @@
- name: Update authorized keys
lineinfile:
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
create: yes
mode: 644
- name: Disable Root password authentication
uci: