Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
NickTheGreek

Mount remote directories with SSHFS

Recommended Posts

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 hostname@X.X.X.X:/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.

https://www.unixmen.com/mount-remote-directories-with-sshfs/

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×