Using SSHFS on Linux/Mac/Windows

SSHFS is a handy tool for mounting remote filesystems on your local machine over SSH. You'll need to install a client to use it.

Install

Mac OS X

Download both FUSE for macOS and SSHFS packages from here: https://osxfuse.github.io/

Install FUSE before SSHFS and you're good to go!

Windows

Download and install Dokan (like FUSE for windows) from here: https://github.com/dokan-dev/dokany/releases

Then, download and install WINSSHFS from here: https://github.com/Foreveryone-cz/win-sshfs/releases

From here, everything is fairly simple. Start the client, connect to SSHfs and your remote directory will show up in windows explorer.

Linux

Simple as ever,

sudo apt-get install sshfs

Usage

On Windows, simply use the GUI to mount a remote filesystem. The parameters are fairly self explanatory. One thing to note is that before connecting, You must save your changes. If you don't click save, clicking 'connect' does not automatically save them.

On Mac and Linux, you need a few more steps.

First, make a directory to mount SSHFS into. I tend to use /sshfs

sudo mkdir /sshfs

Then, give your user permissions on the folder.

sudo chown -R josh /sshfs

Then, mount your filesystem.

sshfs [email protected]:/var/www /sshfs

And there we go. Your filesystem should now be mounted. On Mac, the disk will also show up as a drive in Finder (e.g. OSXFuse Volume 0). Now, when you're done, you'll need to unmount the filesystem. We can do this in the following way.

umount /sshfs
Published 2017-05-29