SSHFS

From FarmShare

Revision as of 13:29, 4 December 2017 by Epoch (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SSHFS is a FUSE module that supports the mounting of a remote directory available over SSH (using SFTP). Once mounted, you can interact with the contents of the remote directory as if it were a local directory. This can make accessing your FarmShare home and scratch directories as convenient as using local files.

On Linux systems you must first install the sshfs or fuse-sshfs package, as appropriate for your distribution. On macOS you can use Homebrew to install the osxfuse and sshfs packages, or download FUSE and SSHFS installers from the FUSE for macOS project.

brew cask install osxfuse
brew install sshfs

After installing SSHFS, create one or more (empty) directories to use as mount points for your remote files. The sshfs command is used to mount a directory; see man sshfs for details, but if you have used scp or rsync the syntax should be familiar.

mkdir -p farmshare/home farmshare/scratch
sshfs -o idmap=user sunetid@rice.stanford.edu:/home/sunetid farmshare/home
sshfs -o idmap=user sunetid@rice.stanford.edu:/farmshare/user_data/sunetid farmshare/scratch

You'll be asked to authenticate. After the mount operation the previously empty mount point directories will now mirror the contents of the remote directories; you can list, copy, move, or delete files and directories in these locations as usual (though links to locations on another volume, like afs-home, will not work). You can disconnect from mounted directories using the umount or fusermount -u command.

Personal tools
Toolbox
LANGUAGES