Posted on January 21, 2015 at 11:00 PM
Do you want to run your own secure cloud storage ! or coding apps remotely and you find yourself uploading a script repeatedly to your virtual server to test!. Luckily there is a way to mount your VPS file system to your local computer, so you can make changes on the fly and treat your droplet as local storage. I'm going to share with you my own experience using SSH to create a secure remotely mounted network filesystem with Linux.
In computing, SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. – Wikipedia
Assuming that you have an SSH server running on your machine and you need an IP address and the default port (22) to connect to your cloud storage. Note that if you run this Linux at home (like I do) you need to forward TCP port 22 on your broadband modem/router to your machine. , in the setup is quite simple. As a Gentoo user :
emerge -av sshfs-fuse
On Ubuntu and Debian based systems it can be installed through apt-get.
sudo apt-get install sshfs
Once SSHFS has been installed you're almost ready to mount the remote file system.
sshfs account@ip:remoteFolderFullPath localFolderPath
sshfs bilo@billel.zapto.org:storage ~/sshfsmount
fusermount -u ~/sshfsmount
To add it to your /etc/fstab,
sshfs#bilo@billel.zapto.org:storage /home/bilo/sshfsmount fuse users 0 0
mount sshfsmount
instead of the whole mount line.
Congratulations. You now have sshfs working!
Cloud storage is an industry term for managed data storage through hosted network (typically Internet-based) service. Several types of cloud storage systems have been developed supporting both personal and business uses.