Skip to content

Instantly share code, notes, and snippets.

@j-faria
Created February 2, 2017 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-faria/133314156f33afb3779b0537cac922e9 to your computer and use it in GitHub Desktop.
Save j-faria/133314156f33afb3779b0537cac922e9 to your computer and use it in GitHub Desktop.
Mount a remote directory locally using `sshfs`
ssh -N -f -L port:server2:22 user@server1
# mount the directory locally
sshfs -C -p port user@localhost:remote_directory local_directory(must exist)
# unmount
sudo umount local_directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment