Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can use sshfs on Mac and Linux operating systems.

Installation

CentOS 7

Code Block
languagetext
sudo yum install sshfs

this will install the fuse-sshfs RPM which comes from the EPEL software repository (Extra Packages for Enterprise Linux).
The fuse-sshfs dependencies, fuse and fuse-libs, come from the CentOS base software repository.

Mac OS

You will need to first install FUSE for macOS. There is also a link for sshfs on the same webpage.

...

Generally, you define the remote server that has access to the filesystem that you are interested in, and 'mount' that to a local directory on your local desktop or laptop:

 

Code Block
languagetext
# Example: mount dtn01:/nfs on your desktop/laptop

...


mkdir ~/nfs

...


sshfs $USER@dtn01.slac.stanford.edu:/nfs ~/nfs

...



# Example: mount dtn01:/afs/slac on your desktop/laptop

...


mkdir ~/afs/slac

...


sshfs $USER@dtn01.slac.stanford.edu:/afs/slac.stanford.edu ~/afs/slac



Make sure $USER is your SLAC Unix username.  If your local desktop or laptop username is different, replace $USER with your SLAC Unix username.

...

Then on your local desktop/laptop, you should be able to see your remote files on as if it's on your local filesystem.

Code Block
languagetext
cd ~/nfs/slac

...


cd ~/nfs/farm

...


cd ~/afs/slac

To unmount when you are finished:

Code Block
cd

...

 

...

# make sure you move outside the mount point

...


/bin/fusermount -u ~/nfs

...

 # CentOS 7

...


/sbin/umount ~/nfs 

...

# MacOS

...



cd # make sure you move outside the mount point

...


/bin/fusermount -u ~/afs/slac 

...

# CentOS 7

...


/sbin/umount ~/afs/slac

...

 # MacOS

Additional Notes:

  • For RHEL 6 and CentOS 6, you may need to add your username to the local fuse group in the /etc/group file, or else use sudo with the sshfs and fusermount commands.
  • If you use SSHFS to mount remote SLAC AFS space, be aware that the AFS token you get during authentication lasts for 25 hours.

...