Loading...
 

Remote File Systems on Mac OS X

OS X v10.7 (Lion)

MacFUSE is no longer maintained; use OSXFUSE or FUSE4X instead.

OS X v10.5 (Leopard)

If you have Leopard on your Mac, then it's truly a simple task to mount a remote file system.

  • First, you are best off if you have followed the setup tips here

OS X v10.4 (Tiger)

If you still have Tiger installed on your Mac, then it's slightly more complicated — but still eminently achievable.

What is SSHFS?

  • SSHFS is a way to mount remote filesystems on your local computer through the SSH protocol.
  • With SSHFS, you directly access files on the Astro network from your Mac — it's just like a regular file folder!

Mac Setup

  • First, you are best off if you have followed the setup tips here
  • Software installation:

    1. First, you should download the MacFUSE package and install it.
    2. Next, you need to download an SSHFS package. The MacFUSE people have it: get it here. Keep track of where you installed it (I just use the default Applications directory).
  • Setup:

    1. Create a directory into which to mount your network directories. For example,

      					mkdir ~/atwork
    2. While logged in remotely to any Astro computer, type the command
      					which sftp-server
      This returns the location of the sftp-server executable... for example, "/usr/local/bin/sftp-server" — hopefully it's similar for you.
    3. While the SSHFS package listed above comes with a graphical interface, I prefer the versatility of the command-line interface. Add the following aliases to your default shell file; in CSH (the C Shell), put the following line in your .cshrc file:

      					alias sshfs /Applications/sshfs.app/Contents/Resources/sshfs-static
      alias astro 'sshfs -o sftp_server=/usr/local/bin/sftp-server -o ssh_protocol=1 -o sshfs_debug @gateway.astro.ucla.edu:/u/ ~/atwork'
      Where "user" is your username on the network. (The "ssh_protocol" will only need to be set to 1 if your server doesn't accept SSH2 connections. The sshfs_debug flag is useful in case you encounter additional errors.)
  • Try it out

    1. Re-load your shell script file. Again, in CSH you would type:

      					source ~/.cshrc
    2. Attempt to login:

      					astro
    3. If everything worked, you should be able to now see the contents of your Astro home account in your new, local "atwork" directory. Just to check:

      					ls ~/atwork
      You might need to wait as long as a minute for the network to successfully mount... but if you do the "ls" command above and the directory isn't empty, congratulations — you did it! (You should also be able to tell because a desktop icon will appear,entitled something like "MacFUSE Volume 0 (sshfs-static)")
  • Unmounting remote directories

    1. First, close all files and Finder windows that are accessing the remote filesystem.
    2. Then, just click on the desktop icon (e.g., "MacFUSE Volume 0") and select "Eject" from the Finder "File" menu.
    3. Alternatively, you can do this by typing the command:

      					unmount atwork
Page last modified on Wednesday 12 of October, 2011 16:07:15 EDT