Cloud-init Issue W/ GenericCloud Image

Home » CentOS-Virt » Cloud-init Issue W/ GenericCloud Image
CentOS-Virt 1 Comment

I’m using the C7.2 GenericCloud image with KVM and am trying to inject my own SSH key by adding it to /etc/cloud/cloud.cfg.d:

sudo virt-customize –upload
~/local/cloud/20_CentOS_sshkey.cfg:/etc/cloud/cloud.cfg.d/20_CentOS_sshkey.cfg
-d c7-template

Contents of the file:

#cloud-config

ssh_authorized_keys:
– ssh-rsa [mysshkeyhere]

The good news is that it puts something in the authorized_keys file (which does not occur without it). The bad news is it’s complete garbage (from guestfish) — http://pastebin.CentOS.org/42526/

Any suggestion on either how to fix this or a better way to inject the key for this usage?

One thought on - Cloud-init Issue W/ GenericCloud Image