【问题标题】:Unable to ssh on Google cloud instance无法在 Google 云实例上 SSH
【发布时间】:2017-03-28 03:55:21
【问题描述】:

我被 sshed 到我的 gcloud 实例。我突然退出并出现以下错误:

Timeout, server 104.198.148.233 not responding.
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]. See https://cloud.google.com/compute/docs/troubleshooting#ssherrors for troubleshooting hints.

再次尝试时,我得到以下信息:

OpenSSH_7.2p2, LibreSSL 2.4.1
debug1: Reading configuration data /Users/aapa/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Connecting to 104.198.148.233 [104.198.148.233] port 22.
debug1: Connection established.
debug1: identity file /Users/aapa/.ssh/google_compute_engine type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/aapa/.ssh/google_compute_engine-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2

如何才能找到问题?我应该采取什么步骤。

【问题讨论】:

标签: ssh google-cloud-platform gcloud


【解决方案1】:

错误是“key_load_public:没有这样的文件或目录”。超时错误建议阅读故障排除指南:https://cloud.google.com/compute/docs/troubleshooting#ssherrors

该指南说错误的可能原因可能是磁盘已满或网络问题。你的磁盘满了吗?您可以通过从 SSH 控制台访问您的实例来检查。

【讨论】:

  • 无法从控制台 ssh。但尝试拍摄磁盘快照。根据快照,磁盘有 70% 可用。关于网络,我能够 ping 服务器。
  • 您应该能够从控制台进行 ssh。你得到什么错误?也许您端的防火墙阻止了传出的 ssh 连接。报错行:“debug1: key_load_public: No such file or directory”提示在服务器上找不到公钥,所以无法验证你的私钥。
猜你喜欢
  • 2017-03-13
  • 1970-01-01
  • 1970-01-01
  • 2017-08-08
  • 1970-01-01
  • 1970-01-01
  • 2015-05-12
  • 1970-01-01
  • 2020-03-26
相关资源
最近更新 更多