Closed dvzrv closed 11 months ago
I use this functionality, but your patch didn't solve the problem:
extra/mkinitcpio-systemd-tool 38-2 [Installiert]
mkinitcpio -p linux ... -> Running build hook: [systemd] -> Running build hook: [systemd-tool] **==> ERROR: invalid source path /etc/mkinitcpio-systemd-tool/config/authorized_keys** replacing initramfs unit file: /usr/lib/systemd/system/initrd-shell.service **==> ERROR: invalid source path /etc/mkinitcpio-systemd-tool/config/authorized_keys** remove existing /etc/tinyssh/sshkeydir convert openssh to tinysshd host key ed25519 ...
Last correct state:
extra/mkinitcpio-systemd-tool 37-3 [installed]
mkinitcpio -p linux ... -> Running build hook: [systemd] -> Running build hook: [systemd-tool] replacing initramfs unit file: /usr/lib/systemd/system/initrd-debug-progs.service replacing initramfs unit file: /usr/lib/systemd/system/initrd-shell.service remove existing /etc/tinyssh/sshkeydir convert openssh to tinysshd host key ed25519 ...
mkinitcpio -p linux ... -> Running build hook: [systemd] -> Running build hook: [systemd-tool] **==> ERROR: invalid source path /etc/mkinitcpio-systemd-tool/config/authorized_keys** replacing initramfs unit file: /usr/lib/systemd/system/initrd-shell.service **==> ERROR: invalid source path /etc/mkinitcpio-systemd-tool/config/authorized_keys** remove existing /etc/tinyssh/sshkeydir convert openssh to tinysshd host key ed25519 ...
Does that file exist? If not, I guess that error is expected.
/etc/mkinitcpio-systemd-tool/config/authorized_keys has to be a copy of /.ssh/authorized_keys generated on every mkinitcpio -p linux
. So why should I generate this file manually?
->https://github.com/random-archer/mkinitcpio-systemd-tool#provisioning-questions-and-answers ... which ssh user keys are used by initramfs sshd server(s)?
they come from host /root/.ssh/authorized_keys
....
they come from host /root/.ssh/authorized_keys
This information is unfortunately wrong and still needs to be updated, see https://github.com/random-archer/mkinitcpio-systemd-tool/pull/104#issuecomment-1756331432
Fix a typo in the
InitrdPath
instruction ininitrd-shell.service
, which prevents the copy of the authorized_keys file and leads to error during run ofmkinitcpio
.Fixes #105