From 42eb637342d219f50311ea7ef8cab284da4edd0a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 16 Jun 2019 03:33:15 -0400 Subject: [PATCH] Add generation of SSH host keys --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index febe5a5..1fe9217 100755 --- a/install.sh +++ b/install.sh @@ -307,6 +307,12 @@ EOF" | tee ${target}/etc/network/if-up.d/issue-gen >&2 chmod +x ${target}/etc/network/if-up.d/issue-gen 1>&2 echo "done." +echo -n "Generating host rsa and ed25519 keys... " +rm ${target}/etc/ssh/ssh_host_*_key* >&2 +chroot ${target} ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key >&2 +chroot ${target} ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key >&2 +echo "done." + echo -n "Installing GRUB bootloader... " mount --bind /dev ${target}/dev >&2 mount --bind /dev/pts ${target}/dev/pts >&2