-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Investigate ssh proxy (For: JetBrains integration, VSCode Desktop) #5602
Comments
The special file to discover current daemons also would be helpful to reuse daemons across different clients, i.e. VS Code or VS Code Insiders, or even JetBrains products. |
Sounds good to me. Would the ProxyCommand then call the local companion app CLI? I.e. is that something that needs to be built first? |
We will first do #4781 and later come back to this issue. |
ProxyCommand only resolve proxy or fake domain issue, it doesn't resolve SSH authentication, still pass The possible solutions I can think of are as follows 1. ssh gatewayprovide a ssh proxy gateway in gitpod.io, just like ws-proxy, we can only use a random username to identify workspace and ssh, user can use This has several benefits:
2. implementation ssh proxy in local-appuse |
I don't know what you think of the two proposals above, I would like to be able to implement this proposal by submitting a PR if possible |
So you're working on this and you'll update here when it's set up? That'd be great, thank you |
I'd be happy to complete this PR, but it requires the approval of the gitpod team, otherwise it won't go production either |
@iQQBot We currently don't have capacity even looking into design, sorry. I like the idea with gateway in ws-proxy, since it does not require the local app at all for VC Code Desktop then. How did you suggest auth to happen I don't think is going to work: We use special vscode remote URL. I tried in the past to change ports and user in the authority but VS Code could not handle it. Besides just doing something like I was wondering whether a user could instead configure ssh key in settings and we would use them somehow in ws-proxy. And ws-proxy will work like a bastion server. I am not an expert in this question. Ideas are welcomed! cc @csweichel since I am not sure about feasibility and security here. |
@akosyakov Thank you for you reply, I try vscode remote url, it support change user |
@akosyakov @csweichel So the whole program should be feasible, now is the point, whether we need the user to upload ssh publickey, I think the need is not very big |
We've look at SSH gateways in the past and found them to be rather involved. Is there a package you have in mind for building this? |
Can use package "golang.org/x/crypto/ssh"
|
I will try to make a demo in the next few days |
https://pkg.go.dev/github.com/kennylevinsen/sshmux looks like an option |
Many thanks, it looks good. I will take a look |
@csweichel it works! |
We agreed to prototype it but it should be time boxed by end of this year. It should not introduce any new components but implemented in ws-proxy. cc @iQQBot |
Right now we have to generate an additional ssh config which is not integrated with user ssh config file. It is troublesome since user has to switch between them, and in case of VS Code Desktop integration we have to mess with remote ssh settings as well.
There is
ProxyCommand
allowing to dynamically resolve host names for fake names, see https://blog.jverkamp.com/2017/12/18/ssh-config-proxycommand-tricks/ We could replace generated ssh config file with a single entry in user ssh config file, like:Where
gpc
is the gitpod local companion cli and%h
is a placeholder filled in by the ssh client while resolving a concrete host likeolive-orangutan-acs8mw87.ws-eu16.gitpod.io
. The cli will look up the api endpoint of the gitpod local companion daemon based on the special file for a current user, e.g. in~/.gitpod/local_apps
fileAfter that it will use the api to proxy ssh connection via the local companion of this host.
@csweichel @svenefftinge wdyt?
It's also nicer for other ssh tools, since they don't need to provide
-F
option anymore, but can do justssh olive-orangutan-acs8mw87.ws-eu16.gitpod.io
. And havinggitpod.io
in the status bar of remote ssh window is another benefit, right now there are just workspace names.The text was updated successfully, but these errors were encountered: