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

protect sshd host keys #66

Open wommel opened 4 years ago

wommel commented 4 years ago

The main systems ssh keys should not be exposed (thats the whole point in encrypting the root partition). A way to acomplish this should at least be documented. Maybe it should even be the default beahviour.

To currently do this you need to:

The error message when generating the image should be removed or at least changed to a warning.

I think the most elegant solution would be to put the conversion into a seperate service and maybe provide a file in config for the port.

Andrei-Pozolotin commented 4 years ago
  1. thank you for the idea

  2. you are welcome to send a PR for a new unit, to be named, say initrd-tinysshd-secure.service, which can rely on new support functions (keys re-gen, key cleanup, etc) to be stored initrd-build.sh

ArchangeGabriel commented 3 years ago

I think that the conversion should not be done automatically at all. This should be an user choice from the start, and also there is no point in running the conversion at each initramfs generation.