Skip to content

Instantly share code, notes, and snippets.

@lonsty
Created November 4, 2020 09:24
Show Gist options
  • Save lonsty/4b51e621dee0e9163427c6039ce1254f to your computer and use it in GitHub Desktop.
Save lonsty/4b51e621dee0e9163427c6039ce1254f to your computer and use it in GitHub Desktop.

Edit remote file via Sublime Text

https://stackoverflow.com/questions/37458814/how-to-open-remote-files-in-sublime-text-3

1. Install rsub on remote server

# wget -O /usr/local/bin/rsub \https://raw.github.com/aurora/rmate/master/rmate
# chmod a+x /usr/local/bin/rsub

2. Install Sublime package rsub on local client

Ctrl + Shift + p, type pcip, then search rsub and install it.

3. Connent to remote server and open file

Open a terminal on local, connect to remote server:

$ ssh -R 52698:localhost:52698 server_user@server_address

Use rsub open a file:

$ rsub path/to/file

File opening auto in Sublime Text 3.

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