microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 293 forks source link

Allow for jump server in protocol links #9863

Open wuillaum opened 6 months ago

wuillaum commented 6 months ago

Currently you can open vscode to a remote location via the following schema

vscode://vscode-remote/ssh-remote+[USER@]HOST[:PORT]/path/to/file

It would be very useful if this were more flexible, especially in terms of allowing a jump host.

In a similar vein of custom ssh options... many people use private repositories, and being able to add the -A flag would be useful as well. Passing the local user agent would allow a user accessing a remote machine to be able to git fetch

chrmarti commented 6 months ago

You could use an SSH config file (~/.ssh/config) to add options for connections to HOST.

wuillaum commented 6 months ago

The protocol links are super useful to me because they work beautifully with dynamically created (typically short-lived) hosts. Clicking a single link to launch vscode saves a ton of time vs configuring ~/.ssh/config or setting up a new remote host within vscode itself.

vscode already supports doing this configuration when you enter the full ssh command here (including agent passing, jump hosts, etc). If this could be expanded with the remote protocol uri too, that would be amazing!

image