Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


SSHFS is a FUSE based file system client for mounting remote directories over a Secure Shell connection.


Table of contents

Table of contents


A correct kernel config is needed:

$ cd /usr/src/linux
$ sudo make nconfig # or `$ sudo make menuconfig`

    # Activate Btrfs in the kernel
    # Double check here: <>
    > File systems  ->
    >     [*] FUSE (Filesystem in Userspace) support


After configuring the kernel don't forget to do a kernel make and rebuild!

$ sudo emerge -a net-fs/sshfs
$ sudo pacman -S sshfs
$ sudo apt install sshfs
$ sudo yum install sshfs
$ sudo dnf install sshfs


You may want to restrict a specific user to a specific directory on the remote system. This can be done by editing /etc/ssh/sshd_config:

$ sudo vi /etc/ssh/sshd_config
    > ...
    > Match User someuser
    >        ChrootDirectory /chroot/%u
    >        ForceCommand internal-sftp
    >        AllowTcpForwarding no
    >        X11Forwarding no
    > ...


  • Mount remote folder via SSHFS:

    $ sshfs [user@]host:[/path/to/remote/folder] /path/to/mountpoint [options]

  • Unmount:

    $ fusermount3 -u /path/to/mountpoint

If this cheat sheet has been useful to you, then please consider leaving a star here.