Skip to content

Instantly share code, notes, and snippets.

@jasondevine
Last active June 14, 2020 16:38
Show Gist options
  • Save jasondevine/d1a679516ec544ba89a0b26d9da1320d to your computer and use it in GitHub Desktop.
Save jasondevine/d1a679516ec544ba89a0b26d9da1320d to your computer and use it in GitHub Desktop.
How to setup and run Sublime Text over SSH, so that you don't have to rely on nano or vi or some such

Technique for opening files on remote server with Subl:

Run this on local machine: Install the rsub package in Sublime Text using the Sublime Package Manager printf "Host *\n RemoteForward 52698 127.0.0.1:52698" >> ~/.ssh/config ..... this adds the port needed by rsub

Execute this on remote server: sudo wget -O /usr/local/bin/subl https://raw.github.com/aurora/rmate/master/rmate; sudo chmod +x /usr/local/bin/subl

SSH command now needs to be this: ssh jason@remoteHost -p 1977 -R 52698:localhost:52698 ... where 'remoteHost' is the IP address of the server/droplet

You're now using Sublime Text over SSH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment