Score:0

Permission denied (publickey). ERROR: exited with return code [255]

cn flag

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. :(

Alex G avatar
ar flag
Based on the error that you are encountering, the installation of RStudio affected the SSH configuration of the VM Instance. There are a couple of troubleshooting that the [GCP documentation](https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh) provided, you can check it out. You can also contact the [RStudio support](https://support.rstudio.com/hc/en-us/requests/new) since you seem to be using Pro because of the SSH function. I also suggest providing the guide that you are following on your post for a better understanding of the issue.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.