{"id":5682,"date":"2015-05-03T10:42:31","date_gmt":"2015-05-03T07:42:31","guid":{"rendered":"http:\/\/www.hbyconsultancy.com\/?p=5081"},"modified":"2015-05-03T10:42:31","modified_gmt":"2015-05-03T07:42:31","slug":"sshfs-mount-remote-directories-locally-with-ssh","status":"publish","type":"post","link":"https:\/\/hbyconsultancy.com\/2015\/05\/sshfs-mount-remote-directories-locally-with-ssh.html","title":{"rendered":"SSHFS Mount remote directories locally with SSH"},"content":{"rendered":"
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.<\/p>\n
So to mount your remote directory using SSH you will need to have sshfs, I am using here Ubuntu trusty 14.04.2 :<\/p>\n
sudo apt-get install sshfs<\/pre>\nLoad the kernel module :<\/p>\n
sudo modprobe fuse<\/pre>\nThen set the permissions required, replace “username”<\/em> with your current user name :<\/p>\n
sudo adduser username fuse\n\nsudo chown root:fuse \/dev\/fuse<\/pre>\nThen finally you can mount it locally :<\/p>\n
mkdir ~\/remote10\n\nsshfs remoteuser@10.10.xx.xx:\/var\/www\/html\/project10 ~\/remote10<\/pre>\nYou might see your remote directory mounted below devices :<\/p>\n