How to mount a remote directory using SSH via SSHFS



Step1:Installing Package

On Ubuntu/Debain

On Redhat/CentOS/Fedora

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  user-name/password. Here are my details for this task.

Now create the mount point and mount SSH account data.

Step3:Testing our set-up

Check if you are able to see the SSH data

#cd /mnt/ssh


Sample output

What about df -hs command output?

Sample output

Step4:So what about mounting it permanently?. We can do it by editing fstab file in /etc folder

go to last line and type below line

Save the file and exit. Now run mount -a to update the fstab file state to kernel.

Let me explain what entry in fstab indicates. We are mentioning mount user root data which is located on server on to /mnt/ssh using fuse file system with default settings.

Step5:What about unmounting this drive?

Enjoy new learning of mounting a folder using SSH protocol.

1,083 total views, 1 views today

Loading Comments…
Allowed HTML tags and attributes: <a href="" title=""> <blockquote> <code> <em> <strong>