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

Allow multi-hop ssh #290

Closed
AlexEvansRaven opened this issue Sep 22, 2021 · 5 comments
Closed

Allow multi-hop ssh #290

AlexEvansRaven opened this issue Sep 22, 2021 · 5 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@AlexEvansRaven
Copy link

I need to be able to ssh into a remote machine, then hop via ssh to another machine's file system on the local vlan. This gets me close, so I can at least edit the first remote machine in vscode, but it would be great to be able ditch vi in the cli entirely if I could multi-hop ssh from the vscode gui.

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Sep 22, 2021

You can add multiple workspace folders, i.e. one for each SSH config, allowing you to access the files (and spawn terminals) on both servers. You can access the file systems and terminals of multiple configs at the same time.

The settings UI, that allows you to edit configs, also allows you to specify a proxy to use. One of the proxy types supported is SSH hopping (#7, although the GUI can now also configure it) which will spawn a SSH session for the hop, then create a tunnel through it to your target server. Your connection will look like Code <-> Hop <-> Remote.

If your hop is also configured to use a hop, you can do e.g. Code <-> Hop1 <-> Hop2 <-> Remote.

@SchoofsKelvin SchoofsKelvin added duplicate This issue or pull request already exists enhancement New feature or request labels Sep 22, 2021
@AlexEvansRaven
Copy link
Author

AlexEvansRaven commented Sep 22, 2021

Hey, sorry to comment on this issue but I wasn't sure it warranted a new one as it's highly related. That's awesome to hear that ssh hopping is supported, though, for future readers, would you consider updating the readme with the example settings blob in #7 ? That made it really clear to me how it functions and may be useful to others looking to configure ssh hops too! Great tool btw.

@SchoofsKelvin
Copy link
Owner

The README already mentions the "hop" JSON property (although you're intended to use the UI instead of directly editing the JSON) and talks about SSH Hopping under the Proxy settings section.

@AlexEvansRaven
Copy link
Author

Ah, I see. The "TO DO" is quite misleading there. I assume that is for field population then, but typing it in still works fine?
image

@SchoofsKelvin
Copy link
Owner

That's indeed an unfinished feature in the UI. But yes, typing the name of another config (exact name, and not label) will still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants