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

[v11] Reduce time spent setting ssh session envs #23833

Merged
merged 5 commits into from Mar 30, 2023

Conversation

rosstimothy
Copy link
Contributor

Backport #23731 branch/v11

rosstimothy and others added 5 commits March 30, 2023 13:14
`tsh` sets a number of environment variables when setting up the
users session. Each key value pair is transmitted one at a time
in a "env" ssh request, which adds a num envs * RTT of additional
latency per session.

This introduces a new `envs@goteleport.com` request which sets
multiple environment variables in a single ssh request, which
reduces the amount of time spent setting envs down to the RTT of
a single ssh request. In order to ensure backward compat and
interoperability with OpenSSH, if the server does not recognize
the `envs@goteleport.com` request the ssh client will resort to
sending individual "env" requests.
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
@rosstimothy rosstimothy marked this pull request as ready for review March 30, 2023 14:28
@rosstimothy rosstimothy added this pull request to the merge queue Mar 30, 2023
Merged via the queue into branch/v11 with commit 42bf611 Mar 30, 2023
20 checks passed
@rosstimothy rosstimothy deleted the bot/backport-23731-branch/v11 branch March 30, 2023 15:32
rosstimothy added a commit that referenced this pull request Mar 31, 2023
Because unknown session requests abort sessions instead of getting
rejected "envs@goteleport.com" breaks backwards compatability.
rosstimothy added a commit that referenced this pull request Mar 31, 2023
* Prevent unknown ssh requests from terminating sessions

Instead of returning and aborting a session if an unknown request
is received servers now log the warning and continue on.

* Revert part of #23833

Because unknown session requests abort sessions instead of getting
rejected "envs@goteleport.com" breaks backwards compatability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants