I would like to mount a remote file system (A) using SSHFS, but sometimes I have IP address, access from which is not allowed. So my plan is to access it via another machine (B) in that network. Do I need to mount A on B and then to mount B (and A) on my local computer? Is there a better way to do it?
Just to clarify the procedure:
First, I make a tunnel
ssh -f user@machineB -L MYPORT:machineA:22 -N
And then I mount the remote file system
sshfs -p MYPORT [email protected]:/myremotepath /mylocalpath
Is it correct?
How do I destroy the tunnel when I am done?