Mount remote directories with SSHFS

Introduction

For those who don’t know, SSHFS stands for Secure SHell FileSystem. It’s a client that enables us to interact with remote directories through SFTP (SSH File Transfer Protocol).
This is a secure file transfer protocol that provides file access, file transfer and file management features over SSH. We’ll install it on a Red Hat based distro.

Install SSHFS Client

First, you need to enable epel-repository. Then, just use yum:

# yum install sshfs

Create a mount point and mount an FS

You must create a mount point directory where you will mount your remote file system. For example on /mnt/sshfstest. Of course, use the mount point you want or need.
Now, you can mount a remote directory under /etc/sshfstest.

# sshfs -o IdentityFile=~/.ssh/id_rsa [email protected]:/remote/directory /mnt/sshfstest
Check mount point

To test, check if the commands above made their jobs. For instance, you can use df.

# df -hT

Conclusion

That’s all, now you have mounted your remote directory. If you want, you can do this permanently editing the /etc/fstab file.

  • Jouni Järvinen

    You tell you can use §fstab§ to permmount it, but you don’t tell how. The §mount§ command is by no means compatible with §fstab§.

  • I’ve made 104000 dollars last year by freelancing from my house a­­n­­d I manage to accomplish that by work­ing part-time f­o­r 3 or sometimes more hours on daily basis. I’m using a business model I stumbled upon from company that i found online and I am happy that i made so much extra income. It’s really newbie-friendly and I am just so thankful that i discovered it. Here’s what I do… STATICTAB.COM/x4biwaa

  • I profited 104000 dollars in 2016 by working on-line from home and I did that by wor­king in my own time f­o­r few hours a day. I used a business model I came across online and I am so thrilled that i was able to make so much money on the side. It’s really user-friendly a­n­d I’m just so happy that i found it. Here is what i do… STATICTAB.COM/x4biwaa

  • I have made 104 thousand bucks previous year by working from my house a­n­d I did that by working part-time f­o­r 3 or sometimes more hrs every day. I used an earning opportunity I found online and I am happy that I was able to earn so much money. It’s so beginner friendly a­­n­­d I am just so grateful that i discovered it. Check out what I do… STATICTAB.COM/gpfvgtj

  • I’ve profited $104k previous year by freelancing from home and I was able to do it by wo­rking part-time f­o­r few h each day. I’m using an earning opportunity I found on-line and I am happy that i was able to make so much money. It’s beginner-friendly a­­n­­d I’m so blessed that i found it. This is what i do… STATICTAB.COM/r2tyhgi

  • I got paid $104k previous year by freelancing on-line and I manage to accomplish that by wor­king in my own time f­o­r few h /day. I followed a business opportunity I came across from this website i found online and I am thrilled that i earned so much extra income. It’s very user-friendly a­­n­­d I’m so blessed that i discovered it. Check out what I did… STATICTAB.COM/astkxim

  • I’ve profited 104000 bucks in last twelve months by doing an on-line job at home a­n­d I did it by wo­rking part time f­o­r several hrs /day. I followed work model I was introduced by this web-site i found on-line and I am so thrilled that i was able to make so much extra income. It’s very newbie-friendly a­n­d I’m so happy that i discovered it. Here’s what I did… STATICTAB.COM/astkxim

  • I have made 104,000 bucks in last 12 months by working online from home and I did it by working part-time for several hours /daily. I’m using work model I came across online and I am so happy that i was able to make so much money on the side. It’s so beginner friendly a­n­d I’m so grateful that i discovered it. Here’s what I did… TWITTER.COM/StinnettMargar1/status/836191059310866432

  • M­a­n­y p­e­o­ple w­a­nt t­o ha­v­e a high earnings at their, bu­t t­he­y do­n’t kno­w ho­w t­o exactly d­o th­at o­n th­e Int­ernet. Th­ere ar­e a l­ot of w­ays t­o ea­rn great am­ount of mo­ney, b­ut wh­enev­er p­eopl­e t­ry th­at the­y g­et tr­app­ed in a fraud, So Now I am sh­aring wi­th yo­u a g­enuine an­d gu­arante­ed w­ay f­or fre­e to ea­rn hug­e am­ount of mon­ey a­t ho­me.I am making atleast $10000 each month since a whole year.Its an online work and also pretty easy to do, Even a little child can do this work and make money. If you want a happy and wealthy life then you need to copy and paste this online site in browser and then follow instructions to get started right now and make Thousands On-line……….. http://b1z­.­org/38V

  • Jouni Järvinen

    A spam comment made me remember that SSHFS can be a really quick way to kill OpenSSH Server (at least. Others not tested), like was the case with 1&1’s shared Web hosting. I reported at least twice and they didn’t care. Even when running Debian 6 with possibly ancient daemon version it can’t be so easy. And what about doing that on a Window$ Client instead of Linux ? INSTANT daemon crash during connection that took 5-15 minutes to come up. 1&1 couldn’t care.