How to mount a remote directory using SSH via SSHFS

Standard

From: http://www.linuxnix.com/2011/03/mount-directory-locally-linux-sshfs.html

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

#ls

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

867 total views, 2 views today