From e26577c08ff516aeffb2f84ecf6e42fbd48b5c5e Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 8 Nov 2023 19:58:19 +0100 Subject: [PATCH] fix --- build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index b06e754..f8539bf 100644 --- a/build.sh +++ b/build.sh @@ -105,12 +105,16 @@ inputKeys "string root; enter" sleep 2 +if [ ! -e ~/.ssh/id_rsa ] ; then + ssh-keygen -f ~/.ssh/id_rsa -q -N "" +fi + cat enablessh.txt >enablessh.local #add ssh key twice, to avoid bugs. -echo "echo '$(base64 ~/.ssh/id_rsa.pub)' | openssl base64 -d >>~/.ssh/authorized_keys" >>enablessh.local +echo "echo '$(base64 -w 0 ~/.ssh/id_rsa.pub)' | openssl base64 -d >>~/.ssh/authorized_keys" >>enablessh.local echo "" >>enablessh.local echo "echo '$(cat ~/.ssh/id_rsa.pub)' >>~/.ssh/authorized_keys" >>enablessh.local