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

Connect to a remote server via code --folder-uri #190

Closed
alsrgv opened this issue May 7, 2019 · 8 comments
Closed

Connect to a remote server via code --folder-uri #190

alsrgv opened this issue May 7, 2019 · 8 comments
Labels
feature-request Request for new features or functionality remote Issues in the code server support

Comments

@alsrgv
Copy link

alsrgv commented May 7, 2019

It would be great to be able to open a remote VS code session from console using a special URIs, e.g.:

$ code --folder-uri ssh://server-name/folder-on-server

Is there anything like that on the roadmap?

@alsrgv alsrgv changed the title Connect to an remote server via code --folder-uri Connect to a remote server via code --folder-uri May 7, 2019
@egamma egamma added feature-request Request for new features or functionality remote Issues in the code server support labels May 7, 2019
@taiya
Copy link

taiya commented May 13, 2019

+1, am I mistaken or when you connect to a SSH remote it goes by default to ~/, and there is no way of configuring this?

@vilicvane
Copy link

vilicvane commented May 28, 2019

We are also looking forward to this feature while trying to integrate remote development into our workflow.

In our scenario, we would like to create one remote workspace for every feature/fix branch. And thus we'll have other tools to manage the lifecycle of those workspaces and providing links to open in VS Code.

And it would be awesome to have VS Code pulled up directly into a remote folder by a link (not sure if it's already working for local folders).

@vilicvane
Copy link

Seems like it's already working:

code-insiders --folder-uri "vscode-remote://ssh-remote+host/path/to/project"

#505

@alsrgv
Copy link
Author

alsrgv commented May 30, 2019

@vilic, exactly what I was looking for! Thanks!

@alsrgv alsrgv closed this as completed May 30, 2019
@taiya
Copy link

taiya commented Jun 13, 2019

Can I bother you with a bit more details?
I have tried this (IP obfuscated):

code-insiders --folder-uri "vscode-remote://12.23.45.67/home/myuser/dev/"

but I get

Failed to connect to the remote extension host server (Error: Port should be > 0 and < 65536. Received NaN.)

@dahjelle
Copy link

Ah! So the syntax is actually:

code --folder-uri "vscode-remote://ssh-remote+12.23.45.67/home/myuser/dev/"

(It wasn't obvious to me that ssh-remote+ was a verbatim part of the command.)

Nice!

@taiya
Copy link

taiya commented Jun 27, 2019

UPDATE: yes, that part was easy to miss :)

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 14, 2019
@aeschli
Copy link
Contributor

aeschli commented Jun 24, 2021

You can also use
code --remote=ssh-remote+12.23.45.67 /home/myuser/dev/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality remote Issues in the code server support
Projects
None yet
Development

No branches or pull requests

6 participants