Tools: Intro to SSHFS
by Craig Miller
SSHFS uses the SSH protocol to for file sharing, which means it is secure, and you can become any user (as long as you know the password) on the remote system. It also plays well with IPv6.
Like any file sharing technology, such as Windows File Sharing (CIFS), or NFS (Network File System), it creates a transparent extension to the local filesystem, making a remote file system appear local.
Unlike CIFS or NFS, SSHFS uses FUSE (File System in User Space), which means you don’t have to have root access to use it.
In the following example, I’ll mount the file system of my router on
mnt as an unprivileged user.
sshfs -d email@example.com:/ mnt/ FUSE library version: 2.9.2 nullpath_ok: 0 nopath: 0 ... firstname.lastname@example.org's password: ...
Then it is a mater of cd-ing into the mount directory, and using your favourite editor to edit a file
cd mnt/etc/ mousepad hosts
When are you are done editing, or copying files, just umount the fuse mount using the
fusermount -u mnt/
The advantages of using SSHFS are:
- Normal file-like operations, using a file manager (copy/delete/rename)
- Enables GUI editing of files when no GUI editor exists on the target system
- Works really well in high-latency situations (editing a file on the other side of the world)
- Works well over IPv6
14 Jan 2019
blowfish from openssh.com via the webarchive