【发布时间】:2021-10-09 01:56:40
【问题描述】:
我已经尝试解决这个问题一段时间了。我一直在连接到我的 VM 以访问 RStudio(一个 IDE)。我运行以下命令:
gcloud beta compute --project "project-name" ssh "my-rstudio" --ssh-flag="-X"
并得到以下错误:
Permission denied (publickey).
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
试图弄清楚发生了什么,所以我使用了更详细的标志:
gcloud beta compute --project "project-name" ssh "my-rstudio" --ssh-flag="-vvv"
最后几行是这样的:
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.
sgerges@34.138.44.143: Permission denied (publickey).
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
知道这里会发生什么吗?我尝试在控制台的 Metadata 部分删除我的 SSH 密钥。那没用。
还有,
gcloud compute routes list
返回预期的default-internet default 0.0.0.0/0 default-internet-gateway 1000
已经在其他线程中尝试了几个小时的建议。任何帮助将不胜感激!
编辑:我尝试通过控制台停止/启动 VM。不幸的是,这也没有用:(
【问题讨论】:
-
255 可能是由于following
标签: google-cloud-platform gcloud rstudio-server