Mounting remote filesystem through SSH/SCP by using SSHFS

Published on Author gryzli

Background

Recently I found myself frequently editing files locally (with some nice IDE/ text editor) and then having to re-upload them to a destination server.

And…. one day I searched for “SSH filesystem” through Google, which was so kind to return me the following result:

https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

This was my first touch to sshfs, which seemed to me very HANDY tool.

Now let’s get the quick and dirty part:

Install SSHFS

Installation is simple and is made on your “client” – usually your laptop/desktop machine:

# OpenSuse
zypper install sshfs

# Debian
apt-get install sshfs

# Fedora
yum install fuse-sshfs

 

 

 

USE SSHFS

# Mount my scripts directory
sshfs root@blog.gryzli.info:/root/scripts blog.gryzli.info_scripts/

# Mount my scripts directory, by using custom SSH Port - 1234
sshfs -p 1234 root@blog.gryzli.info:/root/scripts blog.gryzli.info_scripts/

 

References

http://www.linuxjournal.com/article/8904

https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh