How to install and use sshfs using MacFUSE

Published August 13th, 2009 by lagreca

I wanted to create a secure drop box to my website and decided to try sshfs.

I had MacFuse already installed from using NTFS-3G.

  • Download and install sshfs.
  • Double click the gz file you downloaded to extract and rename it to sshfs.
  • Move the sshfs application to /usr/local/bin/
    • Go to Finder, Go, Go to folder…
    • type in:  /usr/local/bin/
    • Drag the sshfs app to the folder
    • Finder will ask you to authenticate, so type in your password
  • Now you need to change the permissions on the sshfs file so it is executable.
    • Launch Terminal
    • cd /usr/local/bin/
    • ls -al to see files and permissions
    • To change the permissions:  chmod 755 sshfs
    • To change the owner and group:  sudo chown root:wheel sshfs

Now you can use sshfs to mount your remote shares.  I created a script to initiate the mount, but obviously this can be used at the command line. For usage options type:  sshfs -h

Here is my script:

umount /Volumes/Domain.com

rmdir /Volumes/Domain.com

mkdir /Volumes/Domain.com

sshfs username@domain.com:path/uploads/ /Volumes/Domain.com/ -o auto_cache -o local -o volname=Domain.com

Here is what happens:

  • unmount anything that may exist in /Volume/Domain.com
  • delete any Domain.com folder that exists in /Volumes
  • create /Volumes/Domain.com to mount the remote file system into
  • finally mount the remote file system

Caveat:  sshfs does NOT do file locking, therefor it would NOT be good to use in a multi-user environment.  You can, but you will more than likely run into problems.


0 Responses to “How to install and use sshfs using MacFUSE”

Feed for this Entry Trackback Address
  1. No Comments

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word