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 root@6makiki.lan:/ mnt/
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
root@6makiki.lan's password: 

Editing Files

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

Umounting SSHFS

When are you are done editing, or copying files, just umount the fuse mount using the fusermount command.

fusermount -u mnt/

SSHFS Summary

The advantages of using SSHFS are:

14 Jan 2019

blowfish from via the webarchive