I've got 2 flavors of launching VS Code on remote servers for you
-
Clean terminal, you know you want to launch code on a remote server. Check out
sshcode.sh
-
You want to launch code on your local machine from inside an existing SSH session. This needs a bit of setup, but seems to work pretty well. Hacks inbound!
- Set
PermitLocalCommand yes
in your SSH config (see example) - Add a
LocalCommand
to stash the username, IP, and current directory in a local file when you connect - Save
hack.sh
in your home directory
Now to connect, use the SSH escape sequence (default single tilde ~
) along with !command
to invoke the script