random-archer / mkinitcpio-systemd-tool

Provisioning tool for systemd in initramfs (systemd-tool)
https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/
Other
112 stars 27 forks source link

Custom authorized_keys implemented in #104 breaks existing installations #107

Closed 9R closed 9 months ago

9R commented 9 months ago

The changes introduced in #104 breaks existing installations that provide authorized_keys only in the old path at /root/.ssh/

I understand the need for custom authorized_keys but ideally this could be implemented in a way that does not require manually copying or linking files on existing installation.

Ideally the systemd unit would fall back to use the old default path if the the is no authorized _keys file in the new location, but I am not sure if that is even possible.

Another improvement to the current solution could be the define the path to authorized keys in a config file with the old default path. Anybody who want a custom location could change the path to their needs easily but existing installations would continue to work.

At a minimum the documentation in the README.md should reflect the change introduced by #104.

Andrei-Pozolotin commented 9 months ago

Good points, thank you. Please send more PR.

ArchangeGabriel commented 8 months ago

@9R If you want the fallback, you could add a check of the new file existence, and if it does not exist fallback to the old one with maybe a warning message.