Ubuntu – Cannot SSH/SFTP to remote server without using another remote server

nautilussftpssh

I can access a server A with SSH, and from there I can access server B, but I can't access B directly.

Is it possible to open a Nautilus folder in server B by clicking in PlacesConnect to Server?

Best Answer

Yes that is possible. I have the following setup which works, but there might be easier ones.

In the file ~/.ssh/config, add the following lines:

ControlMaster auto
ControlPath   /home/yourusername/.ssh/tmp/%h_%p_%r
Host A
  HostName hostname.of.server.a

Host B
  ProxyCommand ssh -e none A netcat -w 5 hostname.of.server.b 22

You have to replace yourusername, hostname.of.sever.a and hostname.of.server.b After that, you can (in Nautilus) go to Places->Connect to Server (its actually File->Connect to Server on my machine). And then enter B. That should be all to see the server B.

Related Question