Skip to content

Instantly share code, notes, and snippets.

@heldr
Created March 25, 2014 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heldr/9771758 to your computer and use it in GitHub Desktop.
Save heldr/9771758 to your computer and use it in GitHub Desktop.

SSHFS on OSX Lion with Homebrew

NOTE: If you recently upgrade to Mountain Lion you probably need fix Homebrew + GCC

Change the /usr/local permission to yourself:

$ chown -R `whoami` /usr/local

Make sure you have a clean installation, if you had installed MacFuse before or you need uninstall it first:

$ sudo /Library/Filesystems/fusefs.fs/Support/uninstall-macfuse-core.sh

Also uninstall fuse4x and sshfs in case you did brew install:

$ brew uninstall fuse4x
$ brew uninstall sshfs

Remove garbage:

$ rm -rf /usr/local/include/fuse
$ rm /usr/local/lib/libfuse_*
$ sudo rm -rf /Library/Filesystems/fusefs.fs
$ sudo rm -rf /System/Library/Extensions/fuse4x.kext/

Try search for fuse and remove anything else left:

$ find / -name "*fuse*" -print

Alright! Time to start over:

$ brew install fuse4x
$ brew install sshfs

Make sure to follow the directions given by brew info fuse4x-kext before trying to use a FUSE-based filesystem.

$ brew info fuse4x-kext
$ sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
$ sudo chmod +s /Library/Extensions/fuse4x.kext/Support/load_fuse4x

Run brew doctor to check if everything is ok and finally:

$ sshfs root@10.0.1.1:/var/www ~/Documents/mount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment