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§.

  • [email protected]

    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

  • [email protected]

    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