From 9e70b7d0e41d9e8e9a2396d97458d487bdded1a9 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 5 Dec 2023 22:44:35 +0100 Subject: [PATCH] minor --- build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 214b080..a2ec101 100644 --- a/build.sh +++ b/build.sh @@ -110,12 +110,16 @@ if [ ! -e ~/.ssh/id_rsa ] ; then ssh-keygen -f ~/.ssh/id_rsa -q -N "" fi +cat enablessh.txt >enablessh.local -$vmsh uploadFile $osname ~/.ssh/id_rsa.pub /root/.ssh/authorized_keys +#add ssh key twice, to avoid bugs. +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 +echo "" >>enablessh.local -cat enablessh.txt >enablessh.local echo >>enablessh.local echo "chmod 600 ~/.ssh/authorized_keys">>enablessh.local