=^.^=

SFTP File-System Abstraction in OS X with OSXFUSE and SSHFS

karma

One of the things I love about KDE is kio's built in, long-time support for sftp:// and fish:// SSH file system abstraction. It lets kdelibs applications like KATE and Konqueror manage files remotely as though they are on the local computer. This saves mountains of time when, for example, working on a live website.

The same kind of functionality can be implemented system-wide with FUSE on Linux and fortunately the same is true for OS X.

First, download and install FUSE for OS X at http://osxfuse.github.com/. FUSE for OS X is a descendent of the abandoned MacFUSE project, be sure to include the MacFUSE abstraction layer during installation.

Now download and install the SSHFS package at https://github.com/osxfuse/sshfs/downloads.

Open Terminal then create a mount point for the remote filesystem and mount it like so:

$ mkdir ~/Documents/remote
$ sshfs user@address:/path ~/Documents/remote

Now you can browse and modify the mounted filesystem in Finder or any other OS X application.

Comments

karma

I believe this could be achieved with a simple alias.

• Ben

What I want to do is be able to plug in a USB drive to the laptop, and perhaps the documents folder in my user directory appears as a regular folder but its actually mapped to the thumb drive. Like a Dropbox folder. The idea is that by removing the USB drive the data is no longer accessible.

karma

@Ben
Not quite sure what you mean. You could mount the thumb drive on another server then use SSHFS to mount it on a local machine, or many machines or you could mount the thumb drive on a local machine and map an SSHFS location to a subdirectory of that.

• Ben

How would I do this with a USB drive? I'd like to have a folder virtualised out onto an external drive or thumb drive. Is this possible?