3

I'm trying to setup an SSHFS share from my local machine to a remote machine, but it is not working. I'm getting the error OSXFUSE file system is not available (see below). How to fix this??

FYI, my local machine is a MacBook Pro laptop running OSX 10.9.3. The remote machine is actually a VirtualBox on the same hardware running CentOS.

% brew install sshfs                                # <---- SSHFS is installed
Warning: sshfs-2.5.0 already installed

% brew install osxfuse                              # <---- OSX Fuse is installed
Warning: osxfuse-2.6.4 already installed

% ssh remote_user@XXX.XXX.XXX.XXX                   # <---- See, SSH works!!
Last login: Wed Jun 18 18:36:11 2014 from XXX.XXX.XXX.XXX
[remote_user@XXX.XXX.XXX.XXX ~]% exit

% sudo mkdir /mnt
% sudo mkdir /mnt/Share    
% sudo sshfs -o IdentityFile=~/.ssh/id_rsa.pub remote_user@XXX.XXX.XXX.XXX:/ /mnt/Share
the OSXFUSE file system is not available (-1)
the OSXFUSE file system is not available (1)

I tried solution described here. But it didn't work for me:

% sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
(kernel) Kext com.github.osxfuse.filesystems.osxfusefs not found for unload request.
Failed to unload com.github.osxfuse.filesystems.osxfusefs - (libkern/kext) not found.
Saqib Ali
  • 559
  • 1
  • 9
  • 18
  • 2
    Seems to be a known issue to some: https://medium.com/dev-tricks/mount-a-remote-filesystem-with-sshfs-8a37e85b39ee – Felix Frank Jun 19 '14 at 14:37
  • 1
    I don't know if you're going to get an answer here, because this isn't really sysadmin related. I would try over on [SU] or [apple.se]. I can refund your bounty so it can be migrated if you would like. – Mark Henderson Jun 21 '14 at 22:54
  • Thanks Mark. FYI, I have asked it on Super User as well :) If I don't get an answer here in 24 hours, I'll take you up on the offer to refund the bounty. – Saqib Ali Jun 22 '14 at 00:59

2 Answers2

1

You can install with Homebrew Cask:

brew install Caskroom/cask/osxfuse

Because:

osxfuse: A full installation of Xcode.app is required to compile this software.
Installing just the Command Line Tools is not sufficient.
Xcode can be installed from the App Store.
osxfuse: Building this formula from source isn't possible due to OS X
Yosemite and above's strict unsigned kext ban.
chicks
  • 3,793
  • 10
  • 27
  • 36
msroot
  • 111
  • 1
0

I am not an expert on this but this configuration worked for me.

Install OSXFUSE

Download OSXFUSE 2.6.0 @ http://osxfuse.github.io/2013/06/17/OSXFUSE-2.6.0.html
With the file downloaded, right click on the .dmg file, open and install it.

Install SSHFS

If you don’t already have Brew installed, go to http://brew.sh/ and install it.

With Brew installed, run in Terminal:

brew install sshfs

If you get an error like “Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.” all you have to do it to open Xcode and accept the agreement and wait it to install the last patches.

Next error that must be fixed is that XCode still uses SDK for 10.8 instead of 10.9. If you get an error saying “xcodebuild: error: SDK “macosx10.9″ cannot be located.“, you will need to edit the fuse4x-kext.rb located at /usr/local/Library/Formula/fuse4x-kext.rb:

Replace on line 21:

“macosx#{MacOS.version}” with “macosx10.8“,

while keeping line 24 (MACOSX_DEPLOYMENT_TARGET) the same.

After installation, Brew will display a message saying “In order for FUSE-based filesystems to work, the fuse4x kernel extension must be installed by the root user:“, so just execute this two lined:

  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

After doing all this you should be able to mount any remote filesystem via SSH.

To create the path where you want to mount your filesystem:

mkdir -pv ~/path/to/mount

And finally mounting the system:

sshfs -C -p PORT user@server:/ ~/path/to/mount

Hope this might work for you as well.

TBI Infotech
  • 1,584
  • 10
  • 17