sshfs(1)
Mount a remote filesystem over SSH using FUSE.
Synopsis
sshfs [OPTION]... USER@HOST:[DIR] MOUNTPOINTDescription
sshfs is a filesystem client based on SSH (Secure Shell) that allows you to mount a remote directory locally over an encrypted SSH connection. It uses FUSE (Filesystem in Userspace) to provide transparent access to files on a remote server without requiring root privileges or special server configuration beyond SSH access.
All file operations are tunneled through SSH, making it useful for secure remote file access, backups, and collaborative work. The mounted filesystem behaves like a local directory, supporting standard file operations, permissions, and symlinks.
Common options
| Flag | What it does |
|---|---|
-o allow_other | Allow other users (besides the one who mounted it) to access the filesystem |
-o IdentityFile=KEY | Specify a private key file for SSH authentication (e.g., ~/.ssh/id_rsa) |
-o port=PORT | Connect to SSH server on a non-standard port (default 22) |
-o reconnect | Automatically reconnect if the SSH connection is lost |
-o StrictHostKeyChecking=no | Skip SSH host key verification (use with caution) |
-o follow_symlinks | Follow symlinks on the remote server |
-o no_readahead | Disable read-ahead for remote file access |
-o cache=no | Disable caching of file attributes and directory listings |
-o ConnectTimeout=SECS | Set SSH connection timeout in seconds |
-C | Enable SSH compression |
Examples
Mount the remote /home/user/documents directory to ~/remote-docs using SSH credentials
sshfs [email protected]:/home/user/documents ~/remote-docsMount with a specific SSH private key for authentication
sshfs -o IdentityFile=~/.ssh/custom_key [email protected]:/var/www ~/webserverMount using a non-standard SSH port (2222) with automatic reconnection
sshfs -o port=2222,reconnect [email protected]:/data ~/mnt/remote-dataMount allowing other system users to access the filesystem
sshfs -o allow_other [email protected]:/shared ~/shared-mountUnmount an sshfs-mounted directory
fusermount -u ~/remote-docsOptimize for slow network connections by disabling caching and read-ahead
sshfs -o no_readahead,cache=no [email protected]:/home/user ~/slow-connection