-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement ProxyJump compatibility #2543
Comments
@klizhentas please review. |
For some reason I though that ProxyJump already works with Teleport, we should definitely support it. @russjones correctly noted though that proxy jump does not allow us to provide trusted cluster name as a parameter though, so it will work as a limited subset of what we have. It also does not seem to be very high priority, so I propose to push this to later releases. |
|
good point, I was not aware of that feature, let's schedule for implementation then some time after the "Pleasanton" |
Hi. Issue #2662 seems to be related to this issue. Thought it was worth pointing out that there is a use case that seems to rely on this functionality. Seems I can't provision EC2 instances using the terraform file or remote-exec provisioners when using a teleport proxy. This works fine when using a bastion running OpenSSH Server. |
This commit implements #2543 In SSH terms ProxyJump is a shortcut for SSH client connecting the proxy/jumphost and requesting .port forwarding to the target node. This commit adds support for direct-tcpip request support in teleport proxy service that is an alias to the existing proxy subsystem and reuses most of the code. This commit also adds support to "route to cluster" metadata encoded in SSH certificate making it possible to have client SSH certificates to include the metadata that will cause the proxy to route the client requests to a specific cluster. `tsh ssh -J proxy:port ` is supported in a limited way: Only one jump host is supported (-J supports chaining that teleport does not utilise) and tsh will return with error in case of two jumphosts: -J a,b will not work. In case if `tsh ssh -J user@proxy` is used, it overrides the SSH proxy coming from the tsh profile and port-forwarding is used instead of the existing teleport proxy subsystem
This commit implements #2543 In SSH terms ProxyJump is a shortcut for SSH client connecting the proxy/jumphost and requesting .port forwarding to the target node. This commit adds support for direct-tcpip request support in teleport proxy service that is an alias to the existing proxy subsystem and reuses most of the code. This commit also adds support to "route to cluster" metadata encoded in SSH certificate making it possible to have client SSH certificates to include the metadata that will cause the proxy to route the client requests to a specific cluster. `tsh ssh -J proxy:port ` is supported in a limited way: Only one jump host is supported (-J supports chaining that teleport does not utilise) and tsh will return with error in case of two jumphosts: -J a,b will not work. In case if `tsh ssh -J user@proxy` is used, it overrides the SSH proxy coming from the tsh profile and port-forwarding is used instead of the existing teleport proxy subsystem
This commit implements #2543 In SSH terms ProxyJump is a shortcut for SSH client connecting the proxy/jumphost and requesting .port forwarding to the target node. This commit adds support for direct-tcpip request support in teleport proxy service that is an alias to the existing proxy subsystem and reuses most of the code. This commit also adds support to "route to cluster" metadata encoded in SSH certificate making it possible to have client SSH certificates to include the metadata that will cause the proxy to route the client requests to a specific cluster. `tsh ssh -J proxy:port ` is supported in a limited way: Only one jump host is supported (-J supports chaining that teleport does not utilise) and tsh will return with error in case of two jumphosts: -J a,b will not work. In case if `tsh ssh -J user@proxy` is used, it overrides the SSH proxy coming from the tsh profile and port-forwarding is used instead of the existing teleport proxy subsystem
Introduction
OpenSSH 7.3 introduced a very convenient way to deal with bastion hosts by adding an option called
ProxyJump
. See some examples here.Currently a Teleport proxy cannot be used with
ProxyJump
. Adding support for this would make OpenSSH clients much easier to use.Proposal
Adding something to like this to
~/.ssh/config
should work:Passing
-J
to OpenSSH client (ssh
) should work:New Flag
If you think about it,
-J
CLI flag for OpenSSH client is exactly whattsh --proxy
is. Therefore let's add-J
support totsh
as well, because it's an equivalent of--proxy
, in other words this should work too:... and
tsh --help
should say, among other things:Backward Comp
Obviously the legacy ProxyCommand support should continue to work.
Better error handling on Proxy side
Currently if you attempt to use ProxyJump with Teleport 3.1-alpha you get:
BTW fixing that error message (it's duplicated) would also be nice, ideally an error like this should say that it's coming from a proxy, not the node (or auth) so it would be easier to debug/troubleshoot:
The text was updated successfully, but these errors were encountered: