diff --git a/build.sh b/build.sh index a2ec101..214b080 100644 --- a/build.sh +++ b/build.sh @@ -110,16 +110,12 @@ 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