Browse code

still trying to get pub key working

Anthony Young authored on 2011/11/11 06:09:25
Showing 1 changed files
... ...
@@ -191,12 +191,13 @@ EOF
191 191
 
192 192
 # Setup stack user with our key
193 193
 if [ -e ~/.ssh/id_rsa.pub ]; then
194
+    PUB_KEY=`cat  ~/.ssh/id_rsa.pub`
194 195
     cat >> $vm_dir/uec/user-data<<EOF
195 196
 mkdir -p /opt/stack
196 197
 useradd stack -s /bin/bash -d /opt/stack -G libvirtd || true
197 198
 echo stack:pass | chpasswd
198 199
 mkdir -p /opt/stack/.ssh
199
-echo "`cat ~/.ssh/id_rsa.pub`" > /opt/stack/.ssh/authorized_keys
200
+echo "$PUB_KEY" > /opt/stack/.ssh/authorized_keys
200 201
 chown -R stack /opt/stack
201 202
 chmod 700 /opt/stack/.ssh
202 203
 chmod 600 /opt/stack/.ssh/authorized_keys