I am passing (YAML representation)
metadata:
items:
- key: sshKeys
value: root:ssh-rsa AAAAB... non@nan
when creating a gcloud instance. But I cannot ssh to the instance
$ ssh 139.242.197.104.bc.googleusercontent.com
Host key fingerprint is SHA256:aSSOS1tMiF9h43C6UIJQW0TqXuYVMfRic3Lm7gYRECQ
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Looks like ssh key is not inserted on boot. Instance is standard RHEL 7.2 kvm guest image converted from qcow2 to raw format and uploaded. Any idea if what I'm doing is the correct incantation for specifying ssh keys in GCE and if what I want is supported by cloud-init?