【问题标题】:Outbound SSH from Google Cloud Shell to an external server从 Google Cloud Shell 到外部服务器的出站 SSH
【发布时间】:2018-09-20 09:35:43
【问题描述】:

我正在使用 gcloud App Engine 并想使用 Google Cloud Shell 从我的私有 git 服务器 克隆一个 git 存储库,但是,出于某种原因,我'得到连接超时。

这是 ssh 给我的:

$ ssh -vvv myuser@myserver.mydomain.com -p 2121
OpenSSH_7.4p1 Debian-10+deb9u4, OpenSSL 1.0.2l  25 May 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "myserver.mydomain.com" port 2121
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to myserver.mydomain.com [158.120.145.109] port 2121.
debug1: connect to address 158.120.145.109 port 2121: Connection timed out
ssh: connect to host myserver.mydomain.com port 2121: Connection timed out

*主机、域、ip 和端口因明显原因而更改

注意事项:

  1. 我的 git 服务器已启动并正在运行,我可以从任何其他服务器连接到它 机器使用相同的命令
  2. 我的 git 服务器日志没有显示任何传入连接 来自 gcloud
  3. 除了 App Engine 之外我没有使用任何东西,我不想 配置计算引擎

有没有人发现同样的问题并愿意分享解决方案?

【问题讨论】:

    标签: git ssh google-cloud-shell


    【解决方案1】:

    Cloud Shell limits the ports on which outgoing TCP connections can be made 到 20、21、22、80、443、2375、2376、3306、8080、9600 和 50051。

    更新 (2018-9-19):此限制已被删除。现在应该可以在所有端口上从 Cloud Shell 建立传出连接。

    【讨论】:

      猜你喜欢
      • 2021-01-15
      • 2021-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 2020-09-25
      • 2021-10-21
      相关资源
      最近更新 更多