I have been trying to figure out this problem for some time now. I have been connecting to my VM to access RStudio (an IDE). Furthermore, I run the following command:
gcloud beta compute --project "project-name" ssh "my-rstudio" --ssh-flag="-X"
and get the following error:
Permission denied (publickey).
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
Tried to figure out what was going on, so I used the more verbose flag:
gcloud beta compute --project "project-name" ssh "my-rstudio" --ssh-flag="-vvv"
The last few lines of that are as such:
debug1: Offering public key: /Users/sherifgerges/.ssh/google_compute_engine RSA SHA256:EUjXtb36bMLZr9QytqoCfxvpUgRFNC2mBnr6SCGkp6o explicit
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
Do you have any idea what can be going on here? I tried deleting my SSH keys in the Metadata
section of the console. That didn't work.
Furthermore,
gcloud compute routes list
returns the expected
default-internet default 0.0.0.0/0 default-internet-gateway 1000
Have tried suggestions in other threads for hours. Any help would be greatly appreciated!
EDIT: I tried stopping/starting the VM via console. That also didn't work, unfortunately. :(