SSHFS
From FarmShare
Line 8: | Line 8: | ||
</source> | </source> | ||
- | After installing SSHFS, | + | After installing SSHFS, create one or more (empty) directories to use as mount points for your remote files. The <code>sshfs</code> command is used to mount a directory; see <code>man sshfs</code> for details, but if you have used <code>scp</code> or <code>rsync</code> the syntax should be familiar. |
<source lang="sh"> | <source lang="sh"> |
Revision as of 14:11, 4 December 2017
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. Once mounted, you can list, copy, move, or delete files and directories as usual. You can disconnect from mounted directories using the umount
or fusermount -u
command.