-
Notifications
You must be signed in to change notification settings - Fork 18
feat: Enable arbitrary SSH options passed via config-ssh #410
Conversation
This pull request has been linked to Clubhouse Story #15898: Add flag to disable SSH connection caching in Coder CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@jawnsy I tagged you again since the scope changed up quite a bit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this means that someone might have:
ControlPath none
ControlPath auto
... or similar, and SSH takes the option that comes first? It seems a little confusing to me but if it functionally works then it seems good
Definitely a bit confusing... I'll add comment that gets appended after custom options explaining the functionality! |
Check it out whenever you get a shot... I think it's good now! |
options := []string{} | ||
if len(additionalOptions) > 0 { | ||
options = []string{ | ||
"# Custom options. Duplicated values will always prefer the first!", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better if we kept a map[string]string
of the name/value pairs, and then override them based on key... but ssh might have some peculiarities with the config format, like being case-insensitive
I think this is an improvement over the status quo so definitely think this is good now, we can always revisit later if we get customer feedback that this is confusing :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this in an iteration, but didn't want the jank of splitting on " " or "="... I wasn't sure if there were additional edge-cases, and didn't wanna risk it!
That's definitely a cleaner approach though, so someday 🙏
[ch15898]