0
votes

I'm playing with gcloud App Engine and would like to clone a git repository from my private git server using the Google Cloud Shell, however, for some reason I'm getting connection timeout.

This is what ssh gives me:

$ ssh -vvv [email protected] -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

*host, domain, ip and port was changed for obvious reasons

Things to take in consideration:

  1. My git server is up and running and I can connect to it from any other machine using the same command
  2. My git server logs doesn't show any incoming connection from gcloud
  3. I'm not using anything but App Engine and I don't want to provision a Compute Engine

Have anyone found the same problem and would like to share the solution?

1

1 Answers

0
votes

Cloud Shell limits the ports on which outgoing TCP connections can be made to 20, 21, 22, 80, 443, 2375, 2376, 3306, 8080, 9600, and 50051.

Update (2018-9-19): this limitation has been removed. It should now be possible to make outgoing connections from Cloud Shell on all ports.