How to Mount Remote Storage with SSHFS

Sometimes you need to get files from a computer that’s far away. Maybe it’s your home server, a school project folder, or a backup drive at your friend’s house. You could download the files with something like SCP, but that takes time and storage space. Wouldn’t it be better if you could just “open” that remote folder like it was on your own computer? That’s where SSHFS comes in.

I’ve used SSHFS many times, especially when working on websites or when I didn’t want to copy huge files. I’m not a fan of waiting forever for a download, especially when I only need one tiny file. SSHFS lets me work with remote files just like they’re local.

In this guide, I’ll show you how to use SSHFS, step by step. It’s simple once you get the hang of it. And yes, we’ll keep the techy terms easy to understand.


What is SSHFS?

SSHFS stands for SSH File System. It’s a way to connect to a remote computer using something called SSH, and then access the files on that computer as if they were on your own.

Let’s break that down.

  • SSH means Secure Shell. It’s a safe way to connect to other computers. People use it to log into servers or move files.
  • Filesystem is just the way your computer organizes files and folders.
  • So SSHFS = a way to view and use files on another computer, using SSH, like they’re part of your computer.

You don’t need to copy the files. You just mount them, which means “make them appear in your folders.”

It’s like borrowing your friend’s bike and riding it without bringing it home. You get to use it, but it stays where it belongs.


Why Use SSHFS?

There are a few reasons I really like SSHFS:

  • It’s fast and safe — because it uses SSH.
  • You can edit, read, and save remote files like they’re on your own hard drive.
  • You don’t need to install heavy tools. Just a simple command, and you’re in.

I once had to update code on my website. I didn’t want to upload a new file every time I changed a line. So I mounted the server with SSHFS. That way, I just saved the file in my editor, and it was already live on the server. Easy and smart.


What You Need Before You Start

Before we dive in, make sure you have the following:

  • A remote computer you can connect to (like a VPS or another Linux machine).
  • Access to SSH on that remote computer (you should be able to run ssh username@remote_ip and log in).
  • SSHFS installed on your own computer.

Let’s check what that means.

If you can already connect to another machine using this:

ssh [email protected]

Then SSHFS will work.


Installing SSHFS

This is the first step. Different systems have different ways of installing it.

On Ubuntu or Debian:

sudo apt update
sudo apt install sshfs

On Fedora:

sudo dnf install sshfs

On macOS (with Homebrew):

brew install sshfs

If your system complains about missing packages, just follow what it tells you. Most of the time, it works without much trouble.

I remember once I had a missing library error. I Googled the error, ran one more command, and it was fixed in under 2 minutes.


Mounting Remote Storage with SSHFS

Now the fun part. Let’s mount a remote folder.

Say you have a remote computer with this info:

  • Username: jane
  • IP address: 192.168.1.50
  • Remote folder: /home/jane/projects
  • You want it to appear on your own computer in: ~/remote_projects

Follow these steps:

  1. Create a folder on your own machine to hold the mounted files:
mkdir ~/remote_projects
  1. Mount the remote folder using SSHFS:
sshfs [email protected]:/home/jane/projects ~/remote_projects

Now go to ~/remote_projects and boom — the files are there.

You can open, edit, rename, and move them just like any folder.

Need to unmount? Run this:

fusermount -u ~/remote_projects

Or on macOS:

umount ~/remote_projects

Benefits of Using SSHFS

SSHFS has saved me so much time. Here are some clear benefits:

  • No need to upload and download: Just open the files directly.
  • Great for editing code remotely: Perfect for web developers.
  • Light on system resources: Doesn’t use much RAM or CPU.

Plus, no need to sync files or worry about making a mess with copies. You’re working on the real files in real time.


Tips and Funny Moments

Let me tell you — one time I mounted the wrong folder and spent 10 minutes editing my server’s logs instead of my actual project. It turns out, /var/log is not where you write code. Who knew?

So here’s what I suggest:

  • Double-check the folder paths before mounting.
  • Make sure you unmount when you’re done. Or you’ll wonder why your files act weird later.
  • Watch your internet connection. If it drops, SSHFS can freeze your file manager. Not forever, just until the connection comes back.

Some Handy Commands and Flags

You can add options to SSHFS to make it smoother.

Here are some useful flags:

  • -o reconnect – Automatically reconnect if connection drops.
  • -o allow_other – Lets other users on your machine see the files.
  • -o cache=yes – Speeds up file access by caching some data.

Example:

sshfs -o reconnect [email protected]:/home/jane/projects ~/remote_projects

This helps when your Wi-Fi acts like it drank too much coffee — shaky and jumpy.


Compare: SCP vs SSHFS

Let’s look at how SSHFS compares to SCP, a tool that also moves files over SSH.

Feature SCP SSHFS
Speed One-time copy Live file access
Good for editing? No Yes
Needs space? Yes (copies files) No (no copy needed)
Interactive use Not great Very smooth
Setup difficulty Simple Slightly more steps

So if you just want to grab one file, SCP is fine. But for ongoing work, SSHFS wins.


Troubleshooting SSHFS

Things can go wrong. But don’t panic. Try these if something breaks.

  • Can’t mount? Check if SSH works by running ssh user@host.
  • Permission denied? Maybe you’re using the wrong folder or don’t have access.
  • File manager freezes? Try fusermount -u or restarting the network.

And always read the error message. Computers are surprisingly honest when they complain.


Final Thoughts

SSHFS might sound like something from a sci-fi movie, but it’s really just a helpful way to access remote files. Think of it as a magic tunnel that lets you use your server’s files like they’re sitting on your own desk.

I like it because it keeps things simple. No extra software, no big downloads, just files when I need them.

Try it out the next time you have to work with a remote machine. You might even start saying “SCP who?” like I do.

Have you tried SSHFS before? Or are you planning to use it soon? Let me know what works for you, or if it gives you any trouble. I’ve probably messed it up before and found a fix.

And remember: when mounting goes smoothly, life really gets unmounted from stress.

 

Leave a Reply