May 3, 2015 Hatem

SSHFS Mount remote directories locally with SSH

Sometimes it’s annoying to work from your Desktop on remote files using command line only, while you can access them easily using GUI. The problem occur if you are editing text files that have non standard encoding, and in this case using command line might broke your encoding or not allow you to see text correctly. So instead of finding a way to display it in command line, I prefer using other editors.

So to mount your remote directory using SSH you will need to have sshfs, I am using here Ubuntu trusty 14.04.2 :

sudo apt-get install sshfs

Load the kernel module :

sudo modprobe fuse

Then set the permissions required, replace “username” with your current user name :

sudo adduser username fuse

sudo chown root:fuse /dev/fuse

Then finally you can mount it locally :

mkdir ~/remote10

sshfs [email protected]:/var/www/html/project10 ~/remote10

You might see your remote directory mounted below devices :

sshfs

Now when you finish you can unmount it using :

fusermount -u  ~/remote10

The end.

,

Leave a Reply

Your email address will not be published. Required fields are marked *

(HBY) Consultancy