From 98007e1b61c9463b2ee9e11e301a24eda33a5fe5 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 9 Sep 2018 16:45:14 +0200 Subject: [PATCH] preconfigure authorized ssh key --- make_usd_card.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/make_usd_card.sh b/make_usd_card.sh index c4966d8..5de3412 100755 --- a/make_usd_card.sh +++ b/make_usd_card.sh @@ -25,6 +25,7 @@ LINUX_VERSION=${LINUX_VERSION:-"latest"} SLACKWARE_VERSION=${SLACKWARE_VERSION:-"current"} SLACKWARE_MINIROOTFS_VERSION=${SLACKWARE_MINIROOTFS_VERSION:-"30Aug18"} +SSH_PUB_KEY=${SSH_PUB_KEY:-~/.ssh/id_ed25519.pub} echo "Going further will wipe ${SD_DEV} and you _will_ lose all data on it !" echo "/!\\ LAST CHANCE TO HIT Ctrl-C /!\\" @@ -75,6 +76,9 @@ EOF cp $CWD/pine64-kernel.SlackBuild $SD_MOUNT_POINT/root +mkdir -p $SD_MOUNT_POINT/root/.ssh/ +cp $SSH_PUB_KEY $SD_MOUNT_POINT/root/.ssh/authorized_keys + umount $SD_MOUNT_POINT/bootenv umount $SD_MOUNT_POINT sync