Guest User

Untitled

a guest
Oct 14th, 2011
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. # simple attempt to get the user ssh key using the meta-data service
  2. mkdir -p /root/.ssh
  3. echo >> /root/.ssh/authorized_keys
  4. curl http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | grep 'ssh-rsa' >> /root/.ssh/authorized_keys
  5.  
  6. echo "AUTHORIZED_KEYS:"
  7. echo "************************"
  8. cat /root/.ssh/authorized_keys
  9. echo "************************"
  10.  
  11. exit 0
  12.  
Advertisement
Add Comment
Please, Sign In to add comment