Table of Contents

SSHFS on CentOS7

SSHFS allows you to mount a remote filesystem using SFTP. This article will go over how to install and use SSHFS.

Installation

We will be using the fuse-sshfs rpm provided by EPEL. We must first enable this repository.

yum install epel-release

Now that the EPEL repository has been enabled we can easily install the fuse-sshfs rpm using yum.

 yum install fuse-sshfs

SSHFS has now been installed!

Mounting a Remote filesystem

SSHFS has many command line options and you can run sshfs –help to see them all. In the example below we will be mounting /home/foobar from our remote server to /mnt on our local server. This can be done by doing the following.

sshfs foobar@remote.server:/home/foobar /mnt

Unmounting a Remote filesystem

Unmounting a previously mounted SSHFS filesystem works the same way it does for any mounted filesystem.

unmount /mnt