diff --git a/tools/build_uec.sh b/tools/build_uec.sh index 174ac47..eabc1e7 100755 --- a/tools/build_uec.sh +++ b/tools/build_uec.sh @@ -191,12 +191,13 @@ EOF # Setup stack user with our key if [ -e ~/.ssh/id_rsa.pub ]; then + PUB_KEY=`cat ~/.ssh/id_rsa.pub` cat >> $vm_dir/uec/user-data< /opt/stack/.ssh/authorized_keys +echo "$PUB_KEY" > /opt/stack/.ssh/authorized_keys chown -R stack /opt/stack chmod 700 /opt/stack/.ssh chmod 600 /opt/stack/.ssh/authorized_keys