How to mount a remote directory in Linux using sshfs

Tutorials Shared by the Internet Community


How to mount a remote directory in Linux using sshfs

Q. I have access rights to one of the remote server through SSH protocol and there is no File share services such as Samba, NFS or FTP etc which are e


  • Total Hits - 33587

  • Total Votes - 103 votes

  • Vote Up - 45 votes

  • Vote Down - 58 votes

  • Domain -

  • Category - Linux/Administration

  • Submitted By - Surendra Anne

  • Submitted on - 2013-09-17 13:14:41


A. The answer to this is yes, We can share data/mount folder on a local machine by using just SSH protocol. This can be done by using FUSE(Filesystem in USErspace) which support SSH and FTP file systems. This post is in response to conversation which I had with one our users two days back. the question he asked about ftp is “I want to transfer one latest file from my ftp server and I want to automate this task through shell script to download latest file from my FTP server, And I don’t know what is the Operating System at server end(This is ultimate sentence I hear from the user today in my office :) )“. Let’s prepare our machine on how to mount a remote folder by using SSH protocol.

Step1: Installing Package

On Ubuntu/Debain

apt-get install sshfs
On Redhat/CentOS/Fedora

rpm -ivh fuse-sshfs-1.8-1.el5.rf.i386.rpm
Step2: Once the package is installed we have to create a mount point and mount our server data using sshfs command, for which we require username/password. Here are my details for this task.

My Username: root

My password: redhat

My Server:

My mount point: /mnt/ssh
Now create the mount point and mount SSH account data.    More detail...

Broken  |   Save  |   Liked  |   Down

E-Books Store