SSHFS
From FarmShare
(One intermediate revision not shown) | |||
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"> | ||
Line 16: | Line 16: | ||
</source> | </source> | ||
- | You'll be asked to authenticate. | + | 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 <code>afs-home</code>, will not work). You can disconnect from mounted directories using the <code>umount</code> or <code>fusermount -u</code> command. |
Latest revision as of 14:29, 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. 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.