mioruq
Last Updated: February 25, 2016
·
18.71K
· daaain
F7aadd9c3f091c013076441ee87adcbf

Edit remote files with Sublime Text over SSH (with sudo too!)

  • Install the rsub plugin for ST2/ST3, which is available through Package Control too.

  • Add a remote forwarding line under the right host in your ~/.ssh/config file to enable connection:

Host myfancyvps
  Hostname 123.45.67.89
  RemoteForward 52698 127.0.0.1:52698
  • SSH in to your remote: ssh myfancyvps

  • Download rmate: curl https://raw.github.com/aurora/rmate/master/rmate > rmate

  • Move it in place: sudo mv rmate /usr/local/bin – you can put in ~/bin too if you only want to set it up for yourself, but sharing is caring :)

  • Make it executable: sudo chmod +x /usr/local/bin/rmate

  • Profit: rmate .profile – make sure you have an open ST2/ST3 window to enable listening!

More details on my blog: http://danieldemmel.me/blog/2012/09/02/setting-up-rmate-with-sublime-text-for-remote-file-editing-over-ssh/

Say Thanks
Respond

4 Responses
Add your response

13516
E86681e49622d52817b36fd2a4c936b7

Thank you very much for this article.

over 1 year ago ·
15707
07scirmw normal

Thanks for this article. For the interested, I wrote a small GUI on top of SSH called Secure Pipes (you can get it at http://www.opoet.com) to make setting up the tunnel a little easier and manageable (like auto reconnect, connect on start-up, etc). I will try to blog about using it with rmate and Sublime when I get a chance, but it works great.

_Tim

over 1 year ago ·
17067
9b2ukcdx normal

Does this work with ST3?

over 1 year ago ·
17069
F7aadd9c3f091c013076441ee87adcbf

@anna: It should work with ST3, though I haven't had to use this for a while. Please let me know if it doesn't work though! :)

over 1 year ago ·
Filed Under