From b9940d88f47727a1566375b356ab12e4a21b57ce Mon Sep 17 00:00:00 2001 From: toby Date: Wed, 7 Nov 2018 22:55:03 +0100 Subject: [PATCH] generating a public ssh key to be part of the image. this one should not change quite as often and can be used for deploy keys --- create_pxeinitrd.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/create_pxeinitrd.sh b/create_pxeinitrd.sh index 123196d..ff447ab 100755 --- a/create_pxeinitrd.sh +++ b/create_pxeinitrd.sh @@ -141,16 +141,13 @@ chmod +x $MNT_DIR/usr/local/bin/start_me_up.sh chmod +x $MNT_DIR/usr/local/bin/shut_me_down.sh chroot $MNT_DIR systemctl enable start-me-up || fail "failed to enable start-me-up" + + chroot $MNT_DIR usermod -p '$1$A5VSg/1j$qqNLwyTlU5BH1IUMPStFB0' root +chroot $MNT_DIR ssh-keygen -q -f /root/.ssh/id_rsa -C root@pxeboot -N "" - -#echo "Enter root password:" -#while ! chroot $MNT_DIR passwd root -#do -# echo "Try again" -#done - - +echo "### public ssh key for root of this install" +cat $MNT_DIR/root/.ssh/id_rsa.pub ##################