0

With a terminal I can do: ssh my_id@server1 and then ssh my_id@server2

(I first reach server1 and from it, reach server2. I need to do it because I can't directly access server2 (college policies)).

With Nautilus I can do: ssh://server1 but then there is no windows to write and so connect to ssh://server2 (talking about this window: http://image.noelshack.com/fichiers/2018/23/5/1528454949-capture-d-ecran-de-2018-06-08-12-47-25.png )

Any idea how to access server2 by accessing server1 first, with Nautilus ?

0

1 Answer 1

1

Create a file ~/.ssh/config if not already exists and add following content:

Host server1
    User my_id
    ServerAliveInterval 120

Host server2
    User my_id
    ProxyCommand ssh -q -W server2:22 server1
    ServerAliveInterval 120

You could even chain more hop servers:

Host server3
    User my_id
    ProxyCommand ssh -q -W server3:22 server2
    ServerAliveInterval 120

(ServerAliveInterval 120 is optional, but I always use it, because many ssh servers will drop idle connections after some time, and this option prevents that by sending a packet every 120 seconds.)

Then you can directly run

ssh server2

and also connect to ssh://server2 with nautilus.

If you have password authentication, the passwords of both servers will be prompted one after the other.

Not the answer you're looking for? Browse other questions tagged .