Personal tools
You are here: Home Members morris Mac OS X SSHFS
Views

Mounting Remote File-Systems via SSH

With sshfs it is possible to mount securely any remote file system, providing you can get to the remote system via ssh. After installing sshfs, I created an alias:

   alias sshfs /Applications/sshfs/bin/mount_sshfs

I also created a root directory on my local machine, where the locally-mounted directories would go:

   mkdir /<remotefs>

I also needed to create the local mount point's directory, too:

   mkdir /<remotefs>/<localmountpath>

Now, to mount a remote filesystem:

   sshfs <username>@<remote_host_ip_address>:<fullpath> /<remotefs>/<localmountpath>

This will ask for the ssh password for this account; after supplying it correctly, the remote filesystem will be mounted under /< remotefs >/< localmountpath >.

To unmount the remote file system, use this:

   umount /<remotefs>/<localmountpath>

MacFUSE

MacFUSE is an alternative method for mounting file systems, and it includes not only mounting remote filesystems via ssh, but also SpotlightFS, which gives true smart folders: "SpotlightFS is a MacFUSE file system that creates true smart folders, where the folders' contents are dynamically generated by querying Spotlight. This differs from Finder's version of smart folders, which are really plist files with a .savedSearch file extension. Since SpotlightFS smart folders are true folders, they can be used from anywhere--including the command line."

Note that the Google SSHFS supports the following flags:

   # Mounting the SSH file system
   $ mkdir /some/mount/point # or use one that already exists
   $ sshfs user@host:/some/directory /some/mount/point -oreconnect,ping_diskarb,volname=<volname>

 Note this version of the sshfs command makes sure that caching is not done, so changes on the remote side show up locally::

   sshfs user@host:/dir /tmp/ssh -ocache=no -onolocalcaches -oping_diskarb,volname=ssh



Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: