SSH Error, return 255

4,245 views
Skip to first unread message

Francisco Favaro

unread,
Nov 10, 2017, 3:17:31 PM11/10/17
to gce-discussion
I am trying to connect to a instance os google cloud several hours, but not sucess. Change the ssh key pair, using the gcloud, all the tutorials, but not wrong. 

This is the error: 

gcloud compute ssh "tomcat-01"

Permission denied (publickey).

ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].


Any Idea ?

Francisco Favaro

unread,
Nov 10, 2017, 3:38:47 PM11/10/17
to gce-discussion
I already changed the ssh key pair, and I already tried using gcloud, but none of the alternatives were successful. I have other instances that are working normally with ssh, and this one is having problems.

Carlos (Cloud Platform Support)

unread,
Nov 10, 2017, 7:11:47 PM11/10/17
to gce-discussion
If you already followed the procedures in the documentation to update the keys, it is possible that your instance might have an outdated VM guest environment. 

There is currently an opened issue and some of the suggestions there might work for you. As explained there the error code 255 is very generic.

William Penrod

unread,
May 27, 2020, 2:57:17 PM5/27/20
to gce-discussion
I am also experiencing this error.

This command helps me diagnose it: gcloud beta compute ssh --zone "<zone>" "<instance name or id #>" --project "<project name or id #>" --ssh-flag="-vvv"

I hope that helps you.
Reply all
Reply to author
Forward
0 new messages