Introduction

Ever find yourself needing to edit remotely over SSH and just wish you could use your favorite locally installed editor?  Yeah VI and EMACS are great, but sometimes don’t you just wish you could have your full workspace open without having to SCP/FTP files around.  Well, you can and here’s how you do it.

Mac/Linux Instructions:

Install the sshfs client according to your specific Linux version

CentOS/Fedora

yum install sshfs

Debian

apt-get install sshfs

Mac OS X

This command assumes that you have MacPorts installed. If you do not, install from here: Install MacPorts

sudo port install sshfs

Configuration

Next create a directory which will be used to access the remote files:

mkdir remote_files

Finally mount the remote server and directory to our local directory “remote_files” replacing “username”, “remote-server” and “some-directory” with your real world values.  This syntax is very similar to that used by scp:

sshfs username@remote-server:/some-directory remote_files

Assuming that the credentials supplied to the sshfs command were correct, you should now have a remotely mounted drive by the name of remote_files.

Now open your favorite editor and browse to remote_files, all your remote files are available to you as if they were local.  Code on!

Windows Instructions:

Begin by downloading win-sshfs at: https://code.google.com/p/win-sshfs/downloads/list

Install and be aware that a reboot may be required (you may want to bookmark this page so you can get back to it after the reboot).  You can just leave the default install options the way they are.

After it has been fully installed and your machine possibly rebooted, lauch wins-sshfs if it hasn’t been launched already.  Next click on the wins-sshfs icon in the task tray.

Next you’ll be presented with a dialog, click the “Add” button and fill out the details of the remote server to connect to.  Ensure you select the correct Drive Letter to use for this remote connection.

Next click “Save”, then click “Mount”.

Conclusion

Assuming you didn’t have any credential errors you will have a newly mapped drive available to you.  Open your favorite editor and begin editing remote files on the drive like they are local.  Code On!


0 Comments

Leave a Reply

Avatar placeholder

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