Mounting server directories on your Mac through SSHFS with MacFUSE

From Dreamwidth Notes
Jump to: navigation, search

This will let you mount a directory on your Mac so you can transparently browse, edit, and save files on a server. Basically, it makes the files on the server a part of your filesystem while you are connected. Opening and saving things will be slower than native files, but not too horrible if you have a decent internet connection speed. You also probably wouldn't want to run any scripts from these directories natively, either, as they are unlikely to work properly.

Installation

First, install MacFUSE. Then download the applicable SSHFS part and put it into a directory in your path:

gunzip sshfs-static-leopard.gz
sudo mv sshfs-static-leopard /usr/local/bin/sshfs

Mounting

Make a directory that you want to be a mount point:

mkdir ~/dw

Now you can use a command like this to connect:

sshfs dw@myserver.org: ~/dw -oauto_cache,reconnect,volname=DW

You can also specify a specific path to mount:

sshfs dw@myserver.org:cvs/dw-free/ ~/dw -oauto_cache,reconnect,volname=DW

Disconnecting

To disconnect, you can use the command:

umount ~/dw

Or go find the mount point and disconnect using Finder.