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

前端 未结 15 952
渐次进展
渐次进展 2020-12-08 07:14

I kept getting kicked out of my compute engine instance after a few seconds of idle with the indicated error (255). I used \'gcloud compute ssh\' to log in. I am using t

15条回答
  •  孤城傲影
    2020-12-08 08:05

    gcloud denies an ssh connection if there was a change in the setup, e.g. after you changed your default zone or region, or you created another instance. Then, you must update the ssh keys in your metadata by

    sudo gcloud compute config-ssh
    

    If this complains about different entries in your config file where your ssh key entries are stored, ~/.ssh/config, delete this file and execute the above command again.

    If you have installed gcloud without sudo, you can omit sudo.

提交回复
热议问题