I have access to two servers at work. Server A hosts git repositories and is externally visible. I would like to be able to clone a repository into Server B which is hosted on Server A.
Currently, I can't ssh from Server B to Server A. I am assuming the firewall is blocking that.
So I am trying to create an ssh tunnel following writeups I've come across, but so far to no avail.
From Server A's shell:
$ ssh -L 1234:localhost:22 user@server_b
This successfully logs me in to Server B. From there I can't seem to do anything using
$ ssh user@localhost $ user@localhost's password: <entered correctly> $ Permission denied, please try again. $ ssh user@localhost -p 1234 $ ssh: connect to host localhost port 1234: Connection refused
Trying to clone
$ git clone ssh://user@localhost:1234/path/to/repo.git/ $ ssh: connect to host localhost port 1234: Connection refused $ fatal: The remote end hung up unexpectedly
Is my initial tunneling command incorrect? Or might I need to get the network admin to open something up on the firewall?