Skip to content

Instantly share code, notes, and snippets.

@noahcoad
Created April 3, 2020 18:30
Show Gist options
  • Save noahcoad/92aaffe51995b1daf3267737426db752 to your computer and use it in GitHub Desktop.
Save noahcoad/92aaffe51995b1daf3267737426db752 to your computer and use it in GitHub Desktop.
Remote Edit Files w Sublime Text

Remote Edit Files w Sublime Text

How to edit a file on a remote linux machine in your local Sublime Text editor. Thanks to @josiahcoad for inspiring me to post this. BOO YAH

  1. Install "RemoteSubl" Sublime Text Plugin

  2. On the remote host, install "rsub"

sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
sudo chmod a+x /usr/local/bin/rsub
  1. Remote into remote host forwarding port to local host
    ssh user@host -R 52698:localhost:52698
    or edit your ~/.ssh/config and add a line:
    RemoteForward 52698 localhost:52698

Now you can edit files on the remote host w your local editor! Like...

rsub hello
cat hello

Also see: Noah Coad's Gist Index

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