Open
Conversation
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.
Problem
ControlPathfor SSH ControlMaster is a Unix domain socket. The previous format~/.ssh/brev-control-%r@%h-%pbuilt the path from remote user, host, and port. On long hostnames (e.g. some AWS EC2 names such asec2-3-90-240-200.compute-1.amazonaws.com), the path could exceed 104 characters—macOS’s limit for Unix socket paths—leading to:unix_listener: path "..." too long for Unix domain socketbrev shelldid not surface this well: it failed with only an SSH exit code and no clear message.Changes
ControlPath (
ssh.go,sshconfigurer.go,sshconfigurer_test.go)ControlPath ~/.ssh/brev-control-%r@%h-%pControlPath ~/.ssh/brev-control-%C%Cis SSH’s 40‑character SHA1 of the connection parameters, so the path no longer depends on hostname length. It remains unique per connection, same as%r@%h-%p, with no other behavior change.Error handling (
pkg/cmd/shell/shell.go)stderris handled withio.MultiWriterso output still appears on the terminal in real time, while failures can be explained.brev refreshso their SSH config is regenerated.brev refresh.Users who have not run
brev refreshand still have the oldControlPathin their SSH config will see a clear explanation instead of a silent or opaque failure.