Currently, given the following SSH configuration in the ~/.ssh/config
file:
Host cdd
User TKTK
HostName TKTK
IdentityFile ~/.ssh/id_rsa
CertificateFile ~/.ssh/id_rsa-cert.pub
I can use VSCode CLI to open any $folder
, using:
code --folder-uri "vscode-remote://ssh-remote+cdd/$folder"
My client side VSCode Version is running on an M1 Mac.
❯ code --version
1.74.0
5235c6bb189b60b01b1f49062f4ffa42384f8c91
arm64
When I do this, it opens up the the folder and shows the workspace file rather than directly opening up the VSCode workspace itself. Then, either automatically, or after clicking on "Open Workspace" the entire window sort of restarts and the workspace actually opens.
Please note that I am NOT using dev containers, I am just using VSCode Remote SSH.
How do I directly open the remote VSCode workspace from the CLI without the entire window reloading?
Found the answer here: https://github.com/microsoft/vscode-remote-release/issues/2133#issuecomment-737200076
Use
--file-uri
instead of--folder-uri
and point directly at the.code-workspace
file.