Skip to content

Extend the preconnect functionality #11278

@Bit-Devil

Description

@Bit-Devil

I'm currently trying to find a solution for an automatic sync to my target servers, when connection through VS Code remote SSH. I've already got my local shell scripts doing exactly that.

I've found the remote.SSH.preconnect option, which would potentially work, but I would need to create a script for each and every host I want to connect to, plus in my use case I am syncing different data depending on the user I'm connecting with. Which wouldn't be that big of a deal, if I would be working with a few VMs only. Currently I've got 70 host to user combinations, which can easily grow up to the hundreds.

So, instead of having hundreds of scripts it would be great to be able to add arguments to the config, at least in the per host configuration, and there at least some "hardcoded values". Even better if it would be possible to use the data which is already present in VS Code.

Minimum requirement:
"remote.SSH.preconnect": {
"host1": "/usr/local/bin/syncEnvironment user1 host",
"host2": "/usr/local/bin/syncEnvironment user2 host",
"host3": "/usr/local/bin/syncEnvironment user3 host",
},

Ideally:
"remote.SSH.preconnect": "/usr/local/bin/syncEnvironment $user-which-I-told-VSCode-to-connect-with $host-which-I-told-VScode-to-connect-to",

Metadata

Metadata

Assignees

Labels

sshIssue in vscode-remote SSH

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions