Apr 26, 2012

sshfs for OS X Lion

Installed the latest version of fuse and sshfs, using Homebrew. I had been using FUSE for a while with previous versions of OS X, but haven't had much luck under Lion. Tried again today, using Fuse4x, rather than libFUSE and everything worked very transparently:

brew install fuse4x sshfs

and that was it!
No, of course that wasn't true. First I had to re-update my Xcode command-line tools. This then removed autoreconf which Apple no longer provide as part of their XCode tools bundle [in neither the command line, or GUI release]. So, via Google, I find you have to install a different set of gcc tools, not shipped by Apple. Then, back to the brew install command line above, and things are a lot happier.
and that was it!
Well, except you really do need to read the installation message which says

==> Caveats
   Make sure to follow the directions given by brew info fuse4x-kextbefore trying to use a FUSE-based filesystem.

Then if you type
brew info fuse4x-kext

You find you need to run the following two commands to get anything to actually work:
sudo cp -rfX /usr/local/Cellar/fuse4x-kext/0.8.14/Library/Extensions/fuse4x.kext /System/Library/Extensions 
sudo chmod +s /System/Library/Extensions/fuse4x.kext/Support/load_fuse4x
and that was it!

No really, it was. Then I was able to mount remote directories, with the simple command:
sshfs <remote_host>:<remote_path> <local_path>

and it actually worked!
To unmount a mounted partition, use the standard

umount <local_path> 


There are comments.

Comments !