When files live on another Linux machine, opening them through a local directory can fit your usual workflow. SSHFS mounts a remote directory at a local path using SFTP over SSH.
I’ll show you how to install SSHFS and mount a remote directory, including how to check access before disconnecting it.
TL;DR
SSHFS mounts a remote directory locally through SFTP over SSH.
- Install the sshfs package on the client, not the remote machine.
- Use a local directory you own as the mount point.
- Use fusermount3 -u to disconnect the mount on Linux.
What is SSHFS?
SSHFS mounts a remote directory at a local path through SSH’s SFTP subsystem. FUSE provides the filesystem interface in userspace.
How to install and mount SSHFS step by step
Install the package on the client, then test SSH before mounting.
Step 1: Install the SSHFS client
Debian and Ubuntu use sshfs. Fedora uses fuse-sshfs. Search your distribution’s repositories if neither applies.
# Debian or Ubuntu
sudo apt update
sudo apt install sshfs
# Fedora
sudo dnf install fuse-sshfs

The screenshot illustrates Fedora’s package step. Confirm remote directory access and SFTP support on the host. For key-based login, see setting up SSH login with a private key.
Step 2: Create a local mount point
A mount point is a local directory where the remote files appear. Create it in your home directory and run SSHFS as your regular user.
mkdir -p "$HOME/remote-files"
The mounting user needs access to this directory. Its contents are hidden until unmounting, so keep it empty.
Step 3: Mount the remote directory
Use an SSH-accessible account, host and remote path.
sshfs [email protected]:/srv/shared "$HOME/remote-files"

SSHFS uses the remote home directory when no path is given. For a non-default port, add -p 2222 or configure an SSH host alias.
Step 4: Check access and unmount
List the mount or open it in a file manager. Access still follows the remote account’s permissions.
ls "$HOME/remote-files"
fusermount3 -u "$HOME/remote-files"

Unmount with the same local path. If it is busy, close programs using it and retry. See the Linux mount guide for the mount-point concept.
SSHFS edge cases
Permission settings, broken connections and boot-time mounts affect who can use SSHFS and how it recovers. Choose these options only when your setup needs them.
Limit access and handle interruptions
By default, the mounting user can access the filesystem. The allow_other option exposes it to other local users and can be paired with default_permissions for local permission checks. It may require user_allow_other in /etc/fuse.conf.
The reconnect option attempts to restore a broken connection, but interrupted operations can fail and open files may need reopening. For “Transport endpoint is not connected,” close programs using the mount and unmount it with fusermount3 -u. SSH keepalives can detect an unresponsive connection sooner, but cannot preserve interrupted writes.
Use a boot mount only when credentials are ready
An /etc/fstab entry can mount automatically, sometimes as root. That account then needs the SSH key and known-host entry, and networking must be ready. The image below is illustrative, not a copy-ready entry.

A user-level systemd mount can keep a personal key out of root’s access. With fstab, test the entry before startup. See changing the SSH port or Linux network configuration for connection setup.
SSHFS failures to check
SSHFS failures often come from SSH access, the remote path or a mount still in use. Check each layer before changing mount options.
- Test the same account and host with ssh. SSHFS also needs the server’s SFTP subsystem.
- Confirm the remote path exists and the account has the required file permissions.
- For a busy or disconnected mount, close shells and apps using it, then retry fusermount3 -u.
SSH authentication or SFTP fails
Connect with ssh using the same account and host first. SSHFS depends on the server’s SFTP subsystem, so an SSH setup that disables SFTP cannot serve this mount. Confirm the remote path exists and the account can read or write the files you need.
The mount is busy or disconnected
A busy mount usually means a shell or application still has a file open beneath the mount point. Leave that directory in every terminal and close programs using it, then retry fusermount3 -u. If the connection dropped and the mount reports “Transport endpoint is not connected,” close its users before unmounting.
Conclusion: use SSHFS for an SSH-accessible directory
SSHFS maps a remote SFTP directory to a local path. Test SSH first, mount as the user who needs access, then unmount before disconnecting.
Use the SSHFS project documentation and its manual page for mount options. The guide to checking open ports on Linux can help diagnose reachability.
What is SSHFS?
SSHFS is a FUSE filesystem client that mounts a remote directory through SFTP over an SSH connection.
How do I unmount SSHFS on Linux?
Run fusermount3 -u followed by the local mount point, for example fusermount3 -u “$HOME/remote-files”.
Is SSHFS safe to use?
SSHFS carries SFTP traffic through SSH and uses the permissions of the remote account. Protect the SSH credentials and host verification, and do not expose the mount to other local users unless needed.
