在空闲了几秒钟之后,我一直被踢出我的计算引擎实例,并出现指示的错误(255)。我使用'gcloud计算ssh‘登录。我使用的是默认防火墙设置,我相信这对于ssh来说已经足够好了。但是如果我遗漏了什么,请指出并建议这个错误的修复方法。基本上,在这一点上,我无法完成任何有效的工作,必须多次使用ssh。
提前谢谢。
然后-
发布于 2018-04-04 09:48:39
如果设置中有更改,例如更改了默认区域或区域,或者创建了另一个实例,gcloud会拒绝ssh连接。然后,必须通过以下方式更新元数据中的ssh密钥
sudo gcloud compute config-ssh
如果此命令抱怨存储ssh密钥条目的配置文件~/.ssh/config中存在不同的条目,请删除此文件,然后再次执行上述命令。
如果你已经安装了没有sudo的gcloud,你可以省略sudo
。
发布于 2014-10-06 14:38:30
255是ssh失败的交互式ssh退出代码-否则,交互式ssh将退出,并显示在ssh会话中执行的最后一个命令的退出代码。
下次从ssh获得退出代码255时,尝试使用--ssh- => =“-vvv”(更多v的标志更多调试输出)运行,看看它是否有助于跟踪连接问题。
发布于 2017-12-11 02:47:53
对于那些停在这个页面上的人。这帮助我解决了这个问题。尝试执行以下操作:
- Click on the "Instances" link on the left side of your google cloud account, which will list down all the instances on the right side. Under connect column, you will see "SSH" drop-down, click on "View cloud Command" and this will bring a new dialog. Copy that command and run on your PC's terminal. This will let you SSH into the google compute engine.
这似乎是Google Cloud Platform本身的一个功能/问题,我们将继续检查它。
https://stackoverflow.com/questions/26193535
复制相似问题