Skip to content

[v12] Reduce time spent setting ssh session envs#23834

Merged
rosstimothy merged 5 commits intobranch/v12from
bot/backport-23731-branch/v12
Mar 30, 2023
Merged

[v12] Reduce time spent setting ssh session envs#23834
rosstimothy merged 5 commits intobranch/v12from
bot/backport-23731-branch/v12

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Backport #23731 to branch/v12

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:27
@rosstimothy rosstimothy enabled auto-merge March 30, 2023 14:50
@rosstimothy rosstimothy added this pull request to the merge queue Mar 30, 2023
Merged via the queue into branch/v12 with commit 0d3e10a Mar 30, 2023
@rosstimothy rosstimothy deleted the bot/backport-23731-branch/v12 branch March 30, 2023 15:29
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 #23834

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.

3 participants