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
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.