Skip to content

Instantly share code, notes, and snippets.

@shubhamagarwal92
Last active March 7, 2019 16:48
Show Gist options
  • Save shubhamagarwal92/053d0f97e2cb27403971c8a859985716 to your computer and use it in GitHub Desktop.
Save shubhamagarwal92/053d0f97e2cb27403971c8a859985716 to your computer and use it in GitHub Desktop.
Mount remote sshfs with tunneling
# Install sshfs on local machine
# https://superuser.com/q/139023
# First make a tunnel (MYPORT==2222)
ssh -f userA@machineB -L MYPORT:machineA:22 -N
# First create mylocalpath folder on local machine
mkdir -p mylocalpath
# And then mount the remote file system
sshfs -p MYPORT userB@localhost:/remotepath mylocalpath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment