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

Knowledgeable and skilled Technology Lead with an ability of software development and supervision. Possess a Bachelor of Science (BS) in Information Technology along with 11+ years of experience with hands-on coding and team management. By profession, I am a Software Engineer, Technology Mentor & Entrepreneur. Passionate about the technologies I use and always eager to share & learn more from that passion.

Leave a Reply

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

%d bloggers like this: