Today I did a lot of testing with the Fedora-34-GCP-Cloud-Base image, even though my virtual machine boots, I am not able to gain access to it, as sshd keeps rejecting my key with the following error:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Steps to reproduce
gcloud compute images create "fedora-34" --source-uri=gs://my-bucket/Fedora-Cloud-Base-GCP-34-1.2.x86_64.tar.gz --guest-os-features=UEFI_COMPATIBLE
ssh-keygen -t ecdsa
ssh ben@1.2.3.4
Observed behaviour: SSH throws an error.
Expected behaviour: I get logged in to the machine.
Other things I have tried
gcloud compute ssh
After a little digging, I found that if your SSH key ends with fedora@something, then you can log in as the fedora user without issues. However, if I supply an SSH key withmajor@something, then I can't log in as fedora or major with my SSH key. Both SSH keys are making it to the system via metadata, but only the fedora key is read and deployed by cloud-init.
fedora@something
fedora
major@something
major
Log in to comment on this ticket.