OpenNetworkLinux
OpenNetworkLinux copied to clipboard
installer: Do not ship precreated ssh host keys with image
Host keys are individual for each machine running sshd(8) and should not be used by multiple hosts for security reasons.
Unfortunately for openssh-server package in Debian ssh host keys precreated in postinst script forcing all debootstrap(8) installations to take care about this problem.
On the other hand one might want to keep previous host keys during reinstall or upgrade. For that purpose introduce onl-ssh helper by the analogy with onl-pki, call it using chroot(1) from main rootfs where ssh-keygen(1) and /dev entries available. It will store host keys in /mnt/onl/config/ssh directory pointed by /etc/ssh/ssh_host_key symlinks for sshd(8).
Signed-off-by: Sergey Popovich [email protected]