Ssh terminal with local files

My extension for VSCode should do what you want. It is a language-generic setup for sending selected code from a file to a specified terminal. For your setup you probably want to use the following settings

"[julia]": {
  "terminal-polyglot.launchCommand": "ssh [hostname here]",
  "terminal-polyglot.runCommand": "include(\"%\")",
  "terminal-polyglot.changeDirectoryCommand": "cd(\"%\")",
  "terminal-polyglot.bracketedPasteMode": true,
  "termianl-polyglot.sendTextBlockCommand": "begin; %; end"
},

And then start julia once you’ve logged in to ssh.

That said, if you do this you’ll miss out on some of the cooler features of the julia extension for vscode: you don’t get inline plotting or inline results, but presumably you’re not getting that anyways right now the way you are just copying the code. (I personally use the extension daily, since I prefer its features over the inline plots and results).

3 Likes