From 227deeb9df5775579e1d5ae82648aa0acc68c100 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Mon, 3 Jul 2017 13:37:59 +0000 Subject: [PATCH] Generate the default host keys for each of the key types --- build.sh | 9 --------- files/rc.local | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 72193ac..15cd407 100755 --- a/build.sh +++ b/build.sh @@ -324,15 +324,6 @@ chroot_rootfs << EOF setupcon --force --save-only -v EOF -## -# ????? -# -install -m 644 files/regenerate_ssh_host_keys.service "$ROOTFS_DIR/lib/systemd/system/" - -chroot_rootfs 'systemctl enable regenerate_ssh_host_keys' - -rm -f "$ROOTFS_DIR/etc/ssh/ssh_host_*_key*" - ## # Wi-Fi firmware and tools. # diff --git a/files/rc.local b/files/rc.local index 675e509..8313f5a 100755 --- a/files/rc.local +++ b/files/rc.local @@ -14,4 +14,8 @@ # Increase root file system size to take all available space. resize2fs "$(findmnt / -o source -n)" +# Generate the default host keys for each of the key types +# for which host keys do not exist (rsa1, rsa, dsa, ecdsa and ed25519). +ssh-keygen -A + exit 0