Mounting Remote File Systems Via SSH On Ubuntu

As a developer a lot of time is spent working with code located on remote servers, downloading files, and re-uploading changes gets tedious using ftp, or standard ssh clients. One solution to this dilemma is sshfs, it allows a remote file system to be mounted locally using the ssh protocol, making editing, creating and deleting files a breeze.

Getting sshfs working is pretty painless and following the instructions below should get you up and ready to go in less than 5 minutes.

First open a terminal window and install sshfs:

sudo apt-get install sshfs

Your user will then need to be added to the fuse group:

sudo adduser (YOUR USERNAME) fuse

After completing this step you will need to log out and back in again or just reboot for the addition to the fuse group to take affect.

Now you simply need to create a directory on your local system where you would like to mount your remote location. After creating a directory open a terminal and execute the command below to mount the remote location:

sshfs username@ipaddress:/remotedirectory /localdirectory

Now if you look in the local folder you created you should be able to see and interact with the directories and files on the remote server as if they where located on your local machine.

Leave a Reply

Your email address will not be published. Required fields are marked *