Skip to content

Investigate ssh proxy (For: JetBrains integration, VSCode Desktop) #5602

Closed
@akosyakov

Description

@akosyakov

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:

Host *.gitpod.io
    ProxyCommand "gpc connect %h"

Where gpc is the gitpod local companion cli and %h is a placeholder filled in by the ssh client while resolving a concrete host like olive-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 file

{
  "gitpod.io": {
    "pid": 22301,
    "apiPort": 40354
  },
  "ak-stable-code-desktop.staging.gitpod-dev.com": {
    "pid": 22302,
    "apiPort": 40356
  }
}

After 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 just ssh olive-orangutan-acs8mw87.ws-eu16.gitpod.io. And having gitpod.io in the status bar of remote ssh window is another benefit, right now there are just workspace names.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions