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 [email protected]: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.