Mounting a remote directory over SSH lets local editors, shell tools, and file managers work with files that still live on another host. SSHFS fits cases where an operator already has SSH access and needs a temporary filesystem view instead of repeated copy commands.
SSHFS is a FUSE client that talks to the server's SFTP subsystem through OpenSSH. The mount command uses the same account, host key trust, private keys, and connection options as a normal ssh user@host.example.net login, so the server usually does not need a separate file-sharing service.
Run SSHFS as the regular local user that will read or write the mounted path, and mount onto an empty directory owned by that user. Remote ownership and permissions still decide what can be changed, and reconnect options can restore the session after a dropped link, but files that were open during the interruption may need to be reopened.
Related: How to copy a file over SSH
Related: How to configure passwordless SSH login
$ ssh user@host.example.net 'ls /home/user/remotefolder' readme.txt
SSHFS uses the same remote account permissions as SSH and SFTP, so a directory that cannot be listed here will fail before the mount appears.
$ mkdir -p /home/user/remote
Files already present under /home/user/remote stay hidden while the remote filesystem is mounted there.
$ sshfs -o reconnect -o ServerAliveInterval=15 user@host.example.net:/home/user/remotefolder /home/user/remote
If the username is omitted, SSHFS uses the current local username. If the remote directory is omitted, SSHFS mounts the remote home directory.
$ findmnt /home/user/remote TARGET SOURCE FSTYPE OPTIONS /home/user/remote user@host.example.net:/home/user/remotefolder fuse.sshfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
The FSTYPE value commonly appears as fuse.sshfs even though the client command is sshfs.
$ ls /home/user/remote readme.txt
$ touch /home/user/remote/file.txt
Skip this write test for read-only remote paths.
$ ssh user@host.example.net 'ls -l /home/user/remotefolder' total 4 -rw-r--r-- 1 user user 0 Jun 13 01:21 file.txt -rw-r--r-- 1 user user 19 Jun 13 01:21 readme.txt
A write failure through the mount usually points to remote directory ownership or permissions, not to the local mount point.
$ fusermount3 -u /home/user/remote