tier1.jp

sshfs, secure and simple remote filesystem.

There are a lot of file share system, NFS, CIFS, WebDAV, cloud services, etc.

Those are not so simple to install.

Especially when you want security, some of legacy methods could be nightmare.

Consider how complex protocol needed,

  1. Secure NFS
  2. WevDAV/SSL

Rev 2

Fix about umount (in BSD, macOS case).

Sometimes we only need a small secure solution

Suppose you only want to access remote files, such like your another computer's files in your LAN, or your server in the Internet.

CIFS, WebDAV over SSL, Kerberos NFS are too complicated to install and over killing.

In case you share your work,

If it is about true file sharing work with multiple people at once, with file operation integrity, that should be an another story.

However, those kind of stuff are already solved. Use distributed VCS such like Git, GNU Bazaar, and/or other cloud solutions, etc.

And now, sshfs

You ONLY need SSH server, SSH client, and FUSE.

Yes, it can mount in userland. What a nice idea.

Note

Assume Debian GNU/Linux Stretch here. No BSD/macOS.

Installation

Server side,

root# apt install openssh-server # and firewall permission.

Client side,

root# apt install sshfs # To install we need root.

Usage

Mounting remote SSH host directory is simple.

user$ sshfs username@host:directory MOUNTPOINT

That's it. SIMPLE, SECURE, STATE OF ART.

  1. You only need to accept ordinal SSH traffics for your firewall.
  2. It's SSH, so almost the most secure remote access method.
  3. It's FUSE, so almost the most secure and simple local method.

Pitfall on Debian Stretch

The sshfs man page describes how to unmount, by umount.

SYNOPSIS

mounting
sshfs [user@]host:[dir] mountpoint [options]
unmounting
umount mountpoint

—from man sshfs, Debian GNU/Linux Stretch.

No. We can not do it without root privilege in GNU/Linux.

However, the README file says,

To unmount the filesystem:

fusermount -u mountpoint

—from /usr/share/doc/sshfs/README.md, Debian GNU/Linux Stretch.

It is FUSE on GNU/Linux (umount works on BSDs and/or macOS).

published: MODIFIED: