Recent Articles

Remote development using Sublime Text 2

31st January 12

This has only been tested on Ubuntu. Open up your terminal and type:

sudo apt-get install sshfs

This will install sshfs onto your system, for more info on sshfs see (http://fuse.sourceforge.net/sshfs.html). Now you need to get your user account the necessary access rights, to do this type:

sudo adduser nick fuse

Change ‘nick’ to your user name that you log into your OS. ‘fuse’ is the user group, in case you were wondering, this user group has pre-determined access rights which makes things easier. Once you have done that, log off and log back in, this ensures that you have the updated set of permissions.

Next you need to create a folder which will simulate whichever folder you wish to access remotely, for example your public_html folder. I created my folder in the home directory called ‘dev’, but you can call yours anything you like.

mkdir ~/dev

Now comes the tricky part, see the code below then I will explain it so you can customise the command in the way you need:

sshfs user@host:website1/public_html/ ~/dev
  • User = the username you log into via SSH
  • Host = the hostname of your server, for me, mine is similar to s123123.gridserver.com
  • After the colon (:) you specify the folder which you want to access on your server, make sure you give the absolute path to the folder.
  • After the space is the location of the folder you want to link to on your system, you need to change this to the folder you created earlier.

You will be prompted for a password, then that’s it! You can now open the project folder in Sublime Text 2 (or your favourite editor). The changes you make to the file will automatically update on your server.