I have a local machine which connects via ssh to a remote machine using a middle machine and a reverse ssh tunnel from remote to middle:

remote$ ssh -p <sshd port> -NTR <local port>:localhost:<sshd port> middle

Thus both

local$ ssh -J middle:<sshd port> localhost -p <local port>


local$ sftp -J middle:<sshd port> -P <local port> localhost

connect to remote.

What is the syntax for sshfs to use this existing reverse tunnel to mount remote:~ onto local:~/mnt?


How can I mount a remote sshfs directory of an publicly inaccessible server on my inaccessible client machine? provides one way of doing this. Are there others which don't require setting up a forward tunnel from local to middle?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.