Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-remote: document the --remote command line syntax #8517

Closed
the-moog opened this issue May 22, 2023 · 1 comment
Closed

ssh-remote: document the --remote command line syntax #8517

the-moog opened this issue May 22, 2023 · 1 comment
Labels
ssh Issue in vscode-remote SSH

Comments

@the-moog
Copy link

The documentation for wsl-remote gives the url format.

From the cli:

`code --remote wsl+default /home/user/work/projects/name`
\#or
`code --folder-uri vscode-remote://wsl+default/home/user/work/projects/name`

Extensions use the same but without the code --switch part.

ref: https://code.visualstudio.com/docs/remote/wsl

Where user is the userid on the WSL instance.
Note: I think the instructions on the link are swapped for folder and file references.

I can't find the same documentation for ssh-remote?
In WSL, being the logical owner of the instance and not a cluster, the full path to the user login is always known.

My question is how does the url format handle the case where the person connecting does not know the absolute path for their login before they login. e.g. when logging into a cluster. Often in that case the login shell determines the users logical homedir path.

How I think this works, is that vscode does a shell login ssh user@system .... bash then installs the vscode remote handlers in ~/.vscode and then does a chdir to the project via that link.

Is there a two step process or does the ${HOME} environment variable work?

I tried all the following with wsl and only the first one works.
This makes a request for the clarrification of the correct syntax. as it is the parsing done in vscode-remote and not wsl-remote or ssh-remote that needs better documetation.

code --remote wsl+default /home/user/work/project1
code --remote wsl+default work/project1
code --remote wsl+default ~/work/project1
code --remote wsl+default ${HOME}/work/project1
code --remote wsl+default "${HOME}/work/project1"
@aeschli
Copy link
Contributor

aeschli commented Jun 2, 2023

I think the instructions on the link are swapped for folder and file references.
I don't see that:
image

Yes, we need to know the full path. At the time we construct the input URI we don't have a connection to WSL yet and can not resolve $HOME or ~.

@aeschli aeschli changed the title Req: Updated documentation for ssh-remote ssh-remote: document the --remote command line syntax Jun 2, 2023
@aeschli aeschli added ssh Issue in vscode-remote SSH and removed wsl Issue in vscode-remote WSL labels Jun 2, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants