How to mount remote directory using SSH ?

How to mount remote directory using SSH and make it available it as local directory.

Install the module sshfs:
[php]sudo apt-get install sshfs[/php]

Load it to kernel
[php]sudo modprobe fuse[/php]

Set permissions
[php]
sudo adduser $USER fuse
sudo chown root:fuse /dev/fuse
sudo chmod +x /dev/fusermount
[/php]

Now create a directory to mount the remote folder in.
[php]mkdir ~/remoteDir[/php]

Run the command to mount remote directory
[php]sshfs [email protected]:/home/public_html ~/remoteDir[/php]

Now remote directory should be mounted.
[php]
cd ~/remoteDir
ls -l
[/php]

Nishant Vaity

I am Software Engineer, Technology Mentor & Entrepreneur. I am passionate about the technologies I use and always eager to share & learn more from that passion. I am an experienced Software Engineer with 8+ years of experience in coding high-traffic websites. Proficient in HTML, JavaScript, jQuery, CSS with LAMP / MAMP / WAMP Stack. Contributor for WordPress open source plugins and Translator (Marathi) for WordPress 4.5.x.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: