How to set up SSHFS and FUSE on CentOS?

Home » Linux » How to set up SSHFS and FUSE on CentOS?
Linux No Comments

What is SSHFS ?

SSHFS stands for SecureShell File System. It is a filesystem client which lets you mount and interact with remote directories and files. (eg:- files located in your office computer).

When i needed to set up sshfs in centos i searched online a lot but i couldn’t find a proper solution which could help me do it without installing 3rd party repositories. So here I’m writing a complete tutorial on how to do it without risking your computer with 3rd party repositories.

First you have to download FUSE and SSHFS.

1. FUSE (click to download)

2. SSHFS (click to download)

* First up you have to log in as the root user to be able to install programs.

* Now you have to install a C Compiler in your computer if you don’t have any installed already. To do this


    yum install gcc

    Then type

    yum install make

* Go to the directory where you downloaded FUSE and SSHFS

* Now we have to untar the downloaded archives. Type

tar zxpfv fuse-2.9.0.tar.gz

cd fuse-2.9.0.tar.gz


* When it’s finished configuring type

make && make install

* Now you have to install glib. Type

yum install glib2-devel

* Go to the directory where the SSHFS tar is. Type

tar zxpfv sshfs-fuse-2.4.tar.gz

    cd sshfs-fuse-2.4.tar.gz


* When the configuration is finished type

make && make install

* Now you have to add yourself to the fuse usergroup. Type

usermod -a- G fuse “yourusername” (put in your username without the quotation marks)

* Now “exit” the root user and log in from your usual user account.

* Now we have to make a directory to mount the remote directory. Type

mkdir remote (you can put any name you want instead of remote)

* We are all set now. Lets connect to the remote computer. Type

    sshfs yourremoteusername@example.machine.comremote/

(Please adjust the bold parts of the above command according to your settings)

* When you need to unmount the remote volume, type

    fusermount -u remote (your folder name instead of “remote”)

Facebook Twitter