2

Say I have ssh access to machine "foo":

me@local: ssh user1@foo

And from there i can access "bar":

user1@foo: ssh user2@bar

With this setup, is there any way I can use sshfs to mount in my local machine a directory located in "bar"?

I don't have administrative access in "foo", so I can't use sshfs to mount a directory there.

Znorg
  • 277

1 Answers1

2

Yes, it's possible to use a ProxyCommand to tell SSH to use "foo" as a "jump point" to access "bar".

You need to set up things so that you can access "bar" directly from your shell. Once you're able to ssh bar without having to explicitly log into "foo" first, sshfs should work transparently (and it does, I just tested it).

To accomplish this, add stuff like this to .ssh/config:

Host bar
   ProxyCommand ssh foo nc -q0 %h %p
roadmr
  • 34,222
  • 9
  • 81
  • 93