-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow using a SSH config file #107
Comments
Some settings (e.g. ForwardAgent) don't make complete sense to use over SFTP? For your case, SSH hopping (#7) seems like a solution, as I send the host (without resolving it) to the hop to connect to. As far as I know, it should be the hop resolving that. The same should happen for HTTP (#64) and SOCK4/SOCK5 (#4) proxies. Also worth noting: Even with proxying, the authentication and everything is done within vscode. If you specified the keys in the configs, and/or use the agent system, it should work. No need for I'm currently working on a way to have external config files (#81), and afterwards, I'm planning on parsing (auto-detected) |
ForwardAgent makes sense, since anyone in my company is given access to servers via its SSH keys. SSH Hoping is the Proxyjump I mentioned Good to hear the feature is on it's way. Thanks ! |
I started working on this feature, and pushed it to the feature/openssh branch. It'll still take a while before it's finished, as there's quite a bit to do:
Quite a bit indeed. Although it shouldn't take too long to have a basic "demo" working. This might also, sooner or later, allow the working of StrictHostKeyChecking (#89) |
I would love to see this finished. I have a loooong ssh config file and it would make using your extension so much easier. |
Hi, I've got a lengthy Thanks, |
I've started working on this in the feature/ssh-config branch. Last pushed commit will automatically get build. Here is a list of the builds for that branch. I've only very very briefly tested it on my Windows 10 machine. It lacks a lot of features, and I'm sure there might be bugs or unexpected/weird interactions happening. This is also why I'm "releasing" it separately from the official releases for now. For the commit I just pushed, supported options can be seen here. It can handle To make use of the feature, open your "sshfs.configs": [
{
"name": "hetzner-ssh",
"label": "Hetzer (SSH)",
"host": "hetzner",
"sshConfig": true
}
] Similar to OpenSSH, it'll use the given |
That's pretty cool. I see you don't yet support
In that configuration, to connect to When I use SSH also has the option to specify the path to the config file. For example I have an SSH config file and a vscode settings file both committed to a repository. I'd like to have the vscode config use the SSH config in the repo instead of in my home dir. It looks like you're parsing the SSH config with code you wrote yourself. I'm not familiar with Javascript or Typescript but if I understand correctly, they're somewhat compatible. Is there a reason you wrote it yourself instead of using a library? The |
Regarding
Part of the problem is that I have yet to rework the connection system to allow ad-hoc or "config-less" connections. While the extension supports SSH hopping, it requires you to specify another config to use. This rework would also support connecting to
It's also not a priority in my eyes, as this extension is mostly focused on the FS and terminal support. Since I'm parsing ssh_config files that specifies X11 forwarding, and it seems relatively easily in the underlying library I use, I'm thinking about supporting it. I'd still have to test how it would behave, especially when a user opens several terminals and runs X11 programs on them.
I did add a
I actually did take a look at it, but decided against it. The main issues I had with it are that it doesn't support |
Randomly just hit this. Silly corporate ssh setup at work getting in the way. Thanks for your work on this issue. |
Quick update: Just added instant-connections (844b0e1), which will help a lot with making |
Changelog since the last major push:
The current version can be downloaded here, built from this run. Unpack and drag the |
In the meantime, port forwarding is currently available as a beta build on the |
This feature is found in https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh but I guess it's not open source. Still, it'd be a good idea to take inspiration about the UI offered to the developer from there. Another way to solve this might be to just not make assumptions about what is and isn't required. If I have an ssh configuration called |
From what I've seen/heard, it basically also just parses the
The extension is the one that is connecting (through the underlying The config resolution currently looks like this:
This "overview" is a lot more complex/verbose than I expected, but it's good to have written down, including for myself It's a very complex progress I have yet to simplify (where possible, at least) and make work better in regards to different config systems, e.g. OpenSSH config systems. I also have to work on adding support for a lot of directives and dealing with certain parsing/technical issues. For example, OpenSSH supports multiple Currently I'm working on supporting more shells (e.g. |
Hello
We've internal servers behind a bastion. Meaning, we can't resolve *.internal.company.com, instead our config define a ProxyJump on bounce.company.com for the internal domain. And once connected on the bastion, can resolve internal and go on connecting.
So either you add the ProxyJump instruction, but that'ld be a bad solution since there are more instructions required like ForwardAgent. Or your allow to define the command used, hence
ssh -o ProxyJump bounce blabla; ForwardAgent yes; etc
. But that'ld be a pain in the ass to redefine the whole config in VSCode. Or you allow reading a SSH config file.Best regards
The text was updated successfully, but these errors were encountered: