4

I am new to ssh-tunneling.

Basically I want to be able to get ssh access to servers in a remote lab (say subnet 1.2.3.X).

I can log into a machine that is visible say 11.22.33.44

I want to be able to log into machines in 1.2.3.X subnet through ssh tunneling, but I am not sure what exactly needs to be done.

Logging into the machines through the machine I can already log into is an option, but I have my development files on my local pc. So I wanted to use the ssh-tunneling.

2 Answers2

4

Transparent Multi-hop SSH

If i understand your question correctly you're looking for a solution to ssh transparently into your lab server through the machine that's visible from the outside (let's call it gate).

As lbutlr mentioned first thing that comes to mind is to ssh into gate first and from there to ssh into your lab server. This works but it's not very convenient and you can't scp files directly between you and the server.

Much better solution: Check out this article on using ssh's ProxyCommand feature. With this you can instruct gate to act as a proxy so you just type ssh lab_server and it all works (even scp !).

lemonsqueeze
  • 1,525
1

Your question seems unclear to me, and I'm not sure why you want ssh-tunneling. How do you login to the visible machine? If that is ssh, then can't you simply ssh from that machine to the internal machines?

For example, when I am away from home, I ssh to my home server, then from there I ssh to 10.0.0.125 which is my desktop machine inside my home LAN. Doesn't that do what you need?

I can also ssh from my home server to my office servers, but cannot ssh to my office remotely otherwise, so I ssh to the home server (fixed IP) and then ssh to my office servers (fix IPs). From there, I can ssh to the machines on the office LAN.

lbutlr
  • 767