13

I use the new VS Code remote feature all the time and it is superb. I'm wondering if it is possible to open a specific ssh host / folder from the cli. That way I can script a spin up of my dev environment (vm, vs-code, etc)!

I had a look at code-insiders --help but couldn't see anything that would allow me to do this. That perhaps makes this a feature request, but thought I'd post here before doing so on the github repo.

Thanks!

Allan Jardine
  • 5,303
  • 5
  • 30
  • 34

1 Answers1

18

Run this on your cmd or PowerShell

code --remote ssh-remote+<remoteHost> <remotePath>

source: https://github.com/microsoft/vscode-remote-release/issues/656#issuecomment-584209378

kuboon
  • 9,557
  • 3
  • 42
  • 32
  • 1
    Also now documented here, with some additional options: https://code.visualstudio.com/docs/remote/troubleshooting#_connect-to-a-remote-host-from-the-terminal – Martin_W Mar 27 '23 at 17:00