Friday, August 22, 2014

OSXFUSE and SSHFS for mounting

Tried to get NFS server working on an NFS system which didn't seem that bad but could never get my Apple Mac to access it.  Always gave me an error.  So I found reference to a mounting method that just uses ssh.  This link describes the process well: https://blogs.law.harvard.edu/acts/2013/11/08/the-newbie-how-to-set-up-sshfs-on-mac-os-x/

To restate, just download and install OSXFUSE and SSHFS from http://osxfuse.github.io.  That should be all you have to install as long as you can ssh into the other computer (in my case a debian embedded device).

Now you make a directory on the server (mkdir /exports) and client side (mkdir ~/exports) for the sharing.  For example if I want to share /exports on the debian side and mount it at ~/exports on the mac side I do the following:

sshfs -p 22 root@xxx.xxx.xxx.xxx:/exports ~/exports -o auto_cache,reconnect,defer_permissions,noappledouble,negative_vncache,volname=myVolName

I found that sshfs doesn't work without the extra options, at least it is read only without the options.  A little experimentation and this reference, I found the only one that was really needed was defer_permissions, thus leaving me with the following:

sshfs root@xxx.xxx.xxx.xxx:/exports ~/exports -o defer_permissions

Good luck.

No comments:

Post a Comment