I am trying to use project-wide SSH keys on my instances in GCP. However, in the VM instance details, despite unchecking the "Block project-wide SSH keys" checkbox and clicking Save, as advised here, it remains checked and I cannot login to the instances using the SSH keys defined in the project metadata. Has anyone else had this problem and managed to resolve it?
1 Answer
You can unblock project-wide SSH keys by running this gcloud command from the cloud shell:
gcloud compute instances add-metadata [INSTANCE_NAME] --metadata block-project-ssh-keys=FALSE
After you run the command you can check if the configuration was applied by running:
gcloud compute instances describe [INSTANCE_NAME] --zone [INSTANCE_ZONE]
-
-
-
Remember to edit the answer. Comments are only temporary, and some people do not see them anyway. I have done it for you this time. Aug 19, 2019 at 18:28