Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
neil committed Dec 5, 2023
1 parent a19c24d commit 012e856
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 012e856

Please sign in to comment.