SSHFS

From FarmShare

(Difference between revisions)
Jump to: navigation, search
(Created page with "[https://en.wikipedia.org/wiki/SSHFS SSHFS] is a [https://en.wikipedia.org/wiki/Filesystem_in_Userspace FUSE] module that can mount a remote directory available over SSH (using S...")
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
[https://en.wikipedia.org/wiki/SSHFS SSHFS] is a [https://en.wikipedia.org/wiki/Filesystem_in_Userspace FUSE] module that can mount 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.
+
[https://en.wikipedia.org/wiki/SSHFS SSHFS] is a [https://en.wikipedia.org/wiki/Filesystem_in_Userspace 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 should install the <code>sshfs</code> or <code>fuse-sshfs</code> package, as appropriate for your distribution. On macOS you can use [https://brew.sh Homebrew] to install the <code>osxfuse</code> and <code>sshfs</code> packages, or download FUSE and SSHFS installers from the [https://osxfuse.github.io FUSE for macOS] project.
+
On Linux systems you must first install the <code>sshfs</code> or <code>fuse-sshfs</code> package, as appropriate for your distribution. On macOS you can use [https://brew.sh Homebrew] to install the <code>osxfuse</code> and <code>sshfs</code> packages, or download FUSE and SSHFS installers from the [https://osxfuse.github.io FUSE for macOS] project.
<source lang="sh">
<source lang="sh">
Line 8: Line 8:
</source>
</source>
-
After installing SSHFS, you'll need to 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.
+
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. Once mounted, you can list, copy, move, or delete files and directories as usual. You can disconnect from the directories using the <code>umount</code> or <code>fusermount -u</code> command.
+
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.

Personal tools
Toolbox
LANGUAGES