1

I am new to this forum and to this kind of stuff so don't judge me hard:

I would like to connect with: sftp client (Bitise Tunneler) and nxClient (NOMACHINE) to the server A through other server B. Because server B is reachable from my computer and A is not.

I understood that I need some kind of tunneling. But don't know how to do it.

Thanks a lot.

1 Answers1

1

The following SSH config in ~/.ssh/config allows you to easily setup tunnels. It requires nc to be installed on the intermediate host.

Host *%*
    ProxyCommand ssh $(echo %h | cut -d%% -f2-) nc $(echo %h | cut -d%% -f1) %p

Running ssh host1.example.com%host2.example.com will SSH to host1 via host2. I don't know whether your SFTP client will use this configuration though. In that case you can manually setup a tunnel for it to use with something like the following:

ssh -fNL 10022:host1.example.com:22 host2.example.com

and then configure the SFTP client to connect to localhost:10022.

mgorven
  • 30,615
  • 7
  • 79
  • 122