ssh tunneling for sftp or GUI

Shivani Rao picture Shivani Rao · Feb 21, 2011 · Viewed 14.4k times · Source

I am trying to use sftp over an ssh tunnel

I have a homePC, that can use a gatewayPC as a jump host to login to a remoteserver

i use the ssh tunnel command

$ssh -t userid@gateway ssh remoteserver

from homePC and it worked great

However, I would like to open a nautilus or any other file manager once I am logged into the other machine

one option is to be able to sftp or ftp over this tunnel

Are there GUI based tools like putty for windows in order to make this happen?

Any help is appreciated

Regards, Shivani

Answer

atiruz picture atiruz · Jul 19, 2012

For that you can use ssh tunnel you must create a file in the path:

atiruz@pc:~$ nano ~/.ssh/config

And add this text (adjusted with your servers):

Host gatewayPC
    HostName 100.110.120.130

Host localPC
    ProxyCommand ssh -A -t root@gatewayPC -p 222 nc 192.168.1.5 22

Host otherPC
    ProxyCommand ssh -A -t localPC nc 10.10.0.55 22

With this example you can go directly from the gatewayPC to the localPC, just run in a terminal:

atiruz@pc:~$ ssh root@localPC

The scheme should be as described in this site. (I made a small change, because in the example of this site did not work on my Ubuntu 12.04).

You can also use it in Nautilus with the following path to be used as follows :

Either in a Terminal: atiruz@pc:~$ nautilus sftp://root@localPC

Or directly in Nautilus: sftp://root@localPC