VS code can do some cool stuff, but it is hard to remember how to set it up to do some of those things. Unless specified, this assumes you are running on a windows machine.

Remote editing a single file via SSH

Here is a nice guide.

First, install Remote VSCode on your development machine (client). Then set up its settings: Add to user settings:

{
//-------- Remote VSCode configuration --------

// Port number to use for connection.
"remote.port": 52698,

// Launch the server on start up.
"remote.onstartup": true
}

Then install rmate on the target machine (host):

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

SSH into the host from PS on the client (You can do this directly in VSCode with ctrl+`):

plink -R 52698:localhost:52698 <user>@<host ip>

Now execute the rmate command on the file you want: rcode <target file>