TL;DR: Is there a way to connect to a SSH project with VS Code and Remote SSH extension from command line?
I'm searching for a way to open a Remote SSH project in VS Code using command line. I used to open local projects in VS Code by running:
# to open new window
code /path/to/my/project
# or to reuse some window
code -r /path/to/my/project
I have Remote SSH and Project Manager extensions installed and I have a lot of projects configured in my projects.json
and ~/.ssh/config
e.g.:
~/.ssh/config
Host project-ssh-alias
HostName 0.1.2.3 # A valid IP of course
IdentityFile ~/.ssh/my-key
User remote-user
~/.config/Code/User/projects.json
{
"name": "My Remote Project",
"rootPath": "vscode-remote://ssh-remote+project-ssh-alias/path/to/my/remote-project",
"paths": [],
"tags": [],
"enabled": true
}
The question: Is it possible to connect to a Remote SSH project in VS Code from command line? I've tried something like the command below, but it didn't work:
code vscode-remote://ssh-remote+project-ssh-alias/path/to/my/remote-project
I expect to VS Code open and connect to my SSH project using Remote SSH extension from command line.