SSHFS: How to Mount Remote Partition via SSH on CentOS

We can easily mount a remote file system by using SSHFS.

1. Enable the EPEL repo

We will need to install a few packages that are not available in the standard CentOS repository. In order to do this, we must enable the EPEL repo.

2. Install FUSE and SSHFS packages

SSHFS uses FUSE (Filesystem in Userspace). Install the required packages:

yum install fuse sshfs

 3. Load the FUSE module

modprobe fuse

Confirm that the FUSE module is loaded:

lsmod | grep fuse
fuse                   84368  2

(Optional) Make sure the FUSE module is loaded upon a reboot:

echo "modprobe fuse" >> /etc/rc.local

 4. Using SSHFS

Once the FUSE module is loaded, we can finally mount our remote partition using SSHFS:

sshfs user@remote_host:/remote_directory /local_mount_partition
sshfs root@ /mnt
Note: SSHFS is not recommended for production, distributed file-systems. NFS is a better option, however, SSHFS can still be quite useful.
Scan to Donate Bitcoin
Like this? Donate Bitcoin to at:
Bitcoin 1HqhvrfNCiZYFWhkfwKUryMCt2fQVmWpjS
Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the author of CentOS Blog. Please feel free to comment with any suggestions, feedback or questions!

  • jp


    Why do you say that SSHFS is not recommended for production ?

    • Curtis K

      Hi jp,

      My understanding is that it is not very tolerant on poor networks, or when connection loss may occur. I have never personally used it for anything in production, so I may be wrong.

  • Ryan Collins

    I’m not able to get fuse to load, keep getting module not found when running modprobe fuse

    • centosblog

      Hi Ryan, is this perhaps on an OpenVZ container?

      • Firman syah

        fuse can’t run on OpenVZ ?