【问题标题】:google compute engine ssh is very slow and then timed outgoogle 计算引擎 ssh 很慢然后超时
【发布时间】:2018-02-15 06:05:52
【问题描述】:

我正在尝试登录谷歌计算引擎虚拟机实例。

$ gcloud compute ssh gke-kubia-default-pool-5af12345-abcd --zone=us-east1-b

花了很长时间,然后导致以下错误。

ssh: connect to host b.b.c.d port 22: Operation timed out
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

我尝试登录我的 mac 终端以及 web 界面中的浏览器终端。 任何想法,如何解决此错误。

【问题讨论】:

    标签: google-cloud-platform


    【解决方案1】:

    检查您是否有允许端口 22 上的入口连接的防火墙规则。 默认规则如下所示 default-allow-ssh Ingress 适用于所有 IP 范围:0.0.0.0/0 tcp:22 允许 1000 个默认值

    如果你没有在下面看到它

    • VPC 网络
    • 防火墙规则

    你可以通过运行来创建它:$ gcloud compute firewall-rules create mySSH --allow tcp:22 --source-ranges 0.0.0.0/0

    我也会尝试通过运行来测试连接:

    $ telnet IP 22 
    

    编辑 => 附加信息:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-02
      • 2013-12-05
      • 1970-01-01
      • 2023-04-10
      • 2017-11-29
      • 2013-11-28
      • 1970-01-01
      • 2018-02-23
      相关资源
      最近更新 更多