Skip to content

MacFUSE and SSHFS

One of the things I love about KDE, my primary Linux desktop environment, is a technology called KIOSlaves. When you’re using it to connect to a remote server over SSH with SFTP for example, all your KDE applications can access files on that remote system exactly as if it was a local disk.

Now that I’m using Mac OS X a fair bit of the time too, I wanted to duplicate this kind of functionality (using OS X’s native applications and not KDE ones running under the operating system).

Thankfully, MacFUSE and SSHFS solve this problem, by allowing you to mount a remote server (using SSH file transfer) as a volume in the Finder. Just like with KIOSlaves, all your Mac apps (and even non-native ones) can read and write over the network as if it was a local file.

So, here’s a quick primer on how to install it.

Head over to the MacFUSE Google Code page and go ahead and download the MacFUSE Core package (at the time of writing, version 0.2.2).

Open up the disk image and run the installer by double-clicking the pkg file.

MacFUSE DMG

You will need to reboot after installation, as MacFUSE adds a kernel extension (don’t worry though, it’s all free/open source under the BSD licence so there should be no nasty stuff, hopefully).

Once you’ve rebooted, head back to the Google Code page and go to downloads. Grab yourself the latest version of sshfs (right now, that’s 0.1.0).

Once again, open up the disk image. This time, just drag the application to your /Applications folder (or wherever you want).

Now, run the application and fill in your details. Click Connect and a couple of seconds later, you’ll need to enter your password (or key passphrase). Finally, your mounted SSH drive should appear on the desktop and in the Finder (make sure your Finder preferences are set to show ‘Connected servers’).

SSHFS window

And that’s it! You can hack away over SSH with full application integration. When you’re done, simply eject the network drive like you would any other and you will be safely disconnected.

It’s actually really awesome – and surprisingly easy. A couple of caveats you need to be aware of, however:

  • While this doesn’t happen for me, you might end up accidentally planting loads of OS X metadata all over your remote filesystem. As I say, I don’t experience this behaviour in the many times I’ve used it, but beware of this possibility before your friends start asking you why you’ve just littered every directory with a .DS_Store file. 😛
  • File sizes are not reported correctly by sshfs. Do not believe what it says.
  • If you run SSH on a non-standard port for anti-cracker reasons (very good idea, by the way), the GUI client to connect won’t work. However, you can use the command line client to initiate the connection. From there on, it works just as advertised.
  • All of this is pre-release software. Worked for me, but YMMV.

It’s awesome, though. 😀

Like this post?

If you would like to support the time and effort I have put into my tutorials and writing, please consider making a donation.

Post a Comment

On some sites, you must be logged in to post a comment. This is not the case on this site.
Your email address is not made public or shared. Required fields are marked with *.
*
*
*

Posting a comment signifies you accept the privacy policy.
Please note — your comment will not appear straight away, as all comments are held for approval.