Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode - open remote from cli

Tags:

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!

like image 609
Allan Jardine Avatar asked Aug 06 '19 19:08

Allan Jardine


People also ask

How does VS Code connect to remote server?

To connect to your remote machine, you can open this URL on any device. Note: You can also connect to your remote machine directly from vscode. dev: Open the Command Palette ( F1 ) in vscode. dev and run the command Remote Server: Connect to Remote.


1 Answers

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

like image 140
kuboon Avatar answered Sep 30 '22 19:09

kuboon