3

This is what I am trying to do. I want to connect to a server C, using a local file manager (nautilus, nemo, pcmanfm). I used to do this just writing

sftp://username@ServerC

in the location bar, or using connect to server option. However, now I am not anymore in the local network, then I need to pass first by a gate server. In the terminal, I do not have any problem jumping the gate server.

Doing

ssh -J gate ServerC

The questions then are:
How could I do this using the file manager?
Is there a way to write a kind of SFTP address considering initially the gate server?
Or to call back my local file manager from the terminal after connecting?

(Server C seems to not have file manager, I do not know if there is any systematic way to check this rather than looking each possible file manager at the time)

zx485
  • 2,337

2 Answers2

7

GVFS (the common network-fs library used by Nautilus and Nemo) creates its SFTP connections using the regular ssh tool as the transport.

The ssh manual page says that -J is a shortcut for the ProxyJump option. You can specify this option permanently in ~/.ssh/config:

Host ServerC
   ProxyJump gate
grawity
  • 501,077
0

If you are open to terminal file managers, nnn can handle options specified like:

sshfs -o ProxyJump=gate,reconnect,idmap=user,cache_timeout=3600

So if you are temporarily out of your local network, you can skip making changes in the ~/.ssh/config.

Other than that, it can also pick up ssh configurations from ~/.ssh/config directly as @user1686 answered. It saves on typing as well. All you need to provide is the host (and password if any).

Arun
  • 26