Tags

SSHFS

One alternative to cifs or smb protocols for accessing remote Linux file systems from Mac OS-X computers is sshfs.

  1. If not already installed, install OSXFUSE and SSHFS from http://osxfuse.github.io
  2. Mount your desired file system using, for example:
    • mkdir /Users/username/DIRECTORY
    • sshfs USER@lnx201.classe.cornell.edu:/PATH-TO-DIRECTORY /Users/username/DIRECTORY -ocache=no -onolocalcaches -ovolname= DIRECTORY

where
  • username is your user name that you logged in to the Mac as
  • DIRECTORY is the directory on samba you wish to access
  • USER is your username on lnx201.classe.cornell.edu
  • PATH-TO-DIRECTORY is the linux NFS path to the directory you wish to access. For help finding the NFS path for the directory you wish to mount, please see https://www.classe.cornell.edu/private/computing/filesystems.html

If you are getting a mount_fusefs: mount point XXX is itself on a MacFUSE volume when trying to remount an sshfs filesystem in OSX:
  • type the “mount” command in a Terminal window
  • find the sshfs#user@host line, and
  • type the command “umount sshfs….” using the connect string from 2.
This will unmount the server, and make it possible for you to connect again using sshfs.

Note that you'll get much better performance, but worse determinism WRT remote changes, using "-o auto_cache" instead of "-ocache=no -onolocalcaches". For an explanation of these options and caveats to using SSHFS, please see: https://github.com/osxfuse/osxfuse/wiki/SSHFS#1-i-am-using-sshfs-and-changed-a-file-externally-not-through-sshfsfuse-for-os-x-on-the-server-but-in-the-sshfs-volume-i-am-not-seeing-the-changes-in-fact-when-i-copy-the-file-through-sshfs-i-get-the-old-content-etc

To dismount the drive (choose one of the following):
  • Drag the Volume’s icon from the Desktop to the Trash
  • Click the volume’s icon and use the Command+E keyboard shortcut
  • Click the File menu and choose Eject.
  • Click the Eject button next to the device in the Finder window sidebar.
  • Right-click the Volume’s icon to display the contextual menu; then choose Eject.
  • From the command line (using Terminal)
    • umount /tmp/SAMBA_DIRECTORY
    • diskutil unmount /tmp/SAMBA_DIRECTORY
Topic revision: r9 - 24 Aug 2017, AdminMichaelRyan
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback