I've seen the
Proxy tab, but I don't think it's working for me here.
Let's take an example to describe what I'm trying to do:
On one side, there is my local network connected to the internet (no problem on this side).
On the other side, a distant network connected to the internet with a gateway. On the distant network every computer can get access to the internet, but due to routing mechanism it's only one way (you cannot connect directly to a computer inside this network from the internet).
- The only way is to login on this distant network's gateway using ssh and then to any computer you want inside the network.
- The gateway is a very minimalist system and I do not have access to my files directly on it, I need to connect to the fileserver inside the distant network.
- As I am not root on any computer of the distant network I cannot change anything on the gateway's configuration.
So we'll say that my local network is localnet.com and the network I'm trying to reach
distantnet.com
.
I have an account (ie:
johndoe
) on every box I need to connect to with my private/key pairs set correctly so I do not have to type any password.
Usually I would proceed like this using any SSH client:
winbox.localnet.com> ssh johndoe@gateway.distantnet.com
gateway.distantnet.com> ssh johndoe@fileserver.distantnet.com
fileserver.distantnet.com> scp whateverfiles johndoe@linuxbox.localnet.com:/tmp
At this point I have all the files I need on my linux box in my local network and I use WinSCP to get the files to my windows box.
So what I am trying to do is use WinSCP to connect to the fileserver through the gateway to avoid copying the files on my Linux box.
I've tried to use the telnet proxy on the ssh gateway (with the port set to 22 and with different command) but it doesn't seems to work. Maybe I am doing something wrong or maybe winscp doesn't support using a ssh connection as a proxy?