Mount Remote Directories with SSHFS on Ubuntu 24.04
You can mount remote directories over SSH on Ubuntu 24.04 using SSHFS, treating remote files as if they were local.
SSHFS (SSH File System) is a powerful tool that allows you to securely access and manage files on a remote server directly from your Ubuntu 24.04 desktop, as if they were stored locally.
This means you can edit remote files with your familiar applications, like LibreOffice or VS Code, without needing to manually download and re-upload them. Imagine editing server configuration files directly from your machine, just like editing any file on your own hard drive.
For example, you might want to mount a web server’s document root on Ubuntu 24.04 to easily edit website content. All transfers are encrypted using the SSH protocol, ensuring your data remains secure.
Install SSHFS via `sudo apt install sshfs`, create a mount point with `mkdir ~/sshmnt`, and then mount the remote directory using `sshfs user@remote_host:/remote/path ~/sshmnt`. Unmount with `fusermount -u ~/sshmnt`.
Install SSHFS on the client
To mount remote directories using SSHFS, you must first install its packages since they are not automatically available on Ubuntu.
Install SSHFS by running the command below.
sudo apt install sshfs
After installation, create a mount point for the remote directory on your client computer by running the command below.
mkdir ~/sshmnt
Finally, mount the remote directory using the SSHFS command, which looks like this:
sshfs svr1.example.com:/home/richard/october ~/sshmnt
- svr1.example.com => remote server with SSH running
- /home/richard/october => remote directory you want to mount
- ~/sshmnt => local mount point created on the client
After mounting the remote directory, you can list the filesystem by running the command below.
df -hT
An output similar to the one below will show the remote directory as mounted.
ilesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 336M 2.0M 334M 1% /run
/dev/sda2 ext4 49G 9.2G 38G 20% /
tmpfs tmpfs 1.7G 0 1.7G 0% /dev/shm
tmpfs tmpfs 5.0M 8.0K 5.0M 1% /run/lock
svr1.example.com:/home/richard/october fuse.sshfs 40G 9.7G 28G 27% /home/richard/sshmnt
You should also see the mount point in the File Manager.

Unmount
Run the command below if you want to unmount or disconnect the remote directory.
fusermount -u ~/sshmnt
You must exit the mount point to unmount the remote directory.
That should do it!
Conclusion:
SSHFS provides a convenient and secure method to access remote directories seamlessly on your local Ubuntu system. Let’s recap the main points:
- Easy Setup: SSHFS can be installed quickly with a simple command and minimal configuration.
- Direct Access: Once mounted, you can interact with remote files as if they were local, enhancing ease of use.
- Secure Connection: SSHFS relies on SSH to ensure your data transfer remains safe and encrypted.
- Flexible Usage: It’s suitable for various applications, whether for document editing, data processing, or file management.
- Simple Unmounting: You can easily disconnect from the remote directory when done, maintaining cleanliness in your system.
Using SSHFS, you can optimize your workflow when working with remote servers, making file access efficient and secure.
Is SSHFS deprecated?
A heads-up: sshfs is no longer actively maintained because its main development repository has been archived! sshfs: Linux is required for this software. libfuse: Linux is required for this software.
Is SSHFS any good?
SSHFS can be very handy when working with remote filesystems, especially if you only have SSH access to the remote system. What’s more, you don’t need to install any special software on either your computer or the remote server. You just need SSH active on your system.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!