Repository navigation
fix(sshclient): 修复 SSH agent 阻断文件私钥回退 - #1
Merged
Merged
Conversation
Combine agent, explicit identity and default key signers into one publickey authentication method so x/crypto/ssh does not skip later key sources. Keep password authentication as a separate fallback and release the agent socket after Dial succeeds or fails. Exercise production Dial with 12 authentication and cleanup scenarios, including an unresponsive agent and public-key rejection before password fallback.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
shayuc137
added a commit
that referenced
this pull request
Oct 23, 2026
Bumps the version markers that must move together (internal/version, SKILL.md frontmatter and the generated references) and closes the changelog section. The changelog gains the one entry it was missing: 5b04b0f, merged via PR #1, fixed key files being skipped whenever an SSH agent was running. x/crypto/ssh uses only the first public-key auth method, so the agent shadowed IdentityFile and the default keys. v0.5.0 rather than v0.4.2 because `cp -r` now lands at <dst>/<name> for existing or slash-terminated destinations, which changes the result of commands that used to work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFntpiMHjBwGsW94eNmAbP
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.
Summary
可连接但为空或密钥不匹配的 SSH agent 会阻断有效的 IdentityFile / 默认私钥认证。将所有 signer 合并为单个 publickey 方法后,文件密钥能够按顺序继续尝试,密码仍作为独立后备方式。
Changes
Testing
go test ./...go test -race ./...go vet ./...staticcheck ./...go build ./...GOOS=... GOARCH=... go build ./...doctor rn、exec rn --no-daemon pwd、exec rn pwd均成功,远端命令退出 0。验证环境:Go 1.26.0 linux/amd64,staticcheck 2026.1。部分未变更包使用 Go 测试缓存。
验证边界:daemon 未运行,普通 exec 日志显示 direct;没有真实 daemon、ProxyJump 或 macOS/Windows 原生运行证据。交叉构建仅证明编译通过。CLI、flags 和 metadata 未变更,无需重新生成 skill 文档。未打版本标签或发布 Release。