[v10] Reduce time spent setting ssh session envs #23832
Merged
rosstimothy merged 5 commits intobranch/v10from Mar 30, 2023
Merged
[v10] Reduce time spent setting ssh session envs #23832rosstimothy merged 5 commits intobranch/v10from
rosstimothy merged 5 commits intobranch/v10from
Conversation
`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>
codingllama
approved these changes
Mar 30, 2023
marcoandredinis
approved these changes
Mar 30, 2023
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 #23832 Because unknown session requests abort sessions instead of getting rejected "envs@goteleport.com" breaks backwards compatability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #23731 to branch/v10