Reduce time spent setting ssh session envs#23731
Merged
rosstimothy merged 5 commits intomasterfrom Mar 30, 2023
Merged
Conversation
592b152 to
c76c825
Compare
Contributor
Author
`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.
c76c825 to
8105e28
Compare
codingllama
reviewed
Mar 29, 2023
codingllama
approved these changes
Mar 29, 2023
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
marcoandredinis
approved these changes
Mar 30, 2023
Contributor
Author
Connect calls |
This was referenced Mar 30, 2023
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.



tshsets 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 number of envs * RTT of additional latency per session.This introduces a new
envs@goteleport.comrequest 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 theenvs@goteleport.comrequest the ssh client will resort to sending individual "env" requests.