Support ssh-agent keys for native SSH#903
Closed
radiantjade wants to merge 1 commit into
Closed
Conversation
Railway SSH currently preflights only public key files under ~/.ssh, which blocks forwarded agents and keychain-backed SSH setups before the native ssh client can authenticate. The change treats ssh-add -L public keys as available local keys for registration and matching, while preserving file-backed keys as the preferred source when both are present. Constraint: Native ssh already supports SSH_AUTH_SOCK, but the CLI key preflight ran before ssh was spawned. Rejected: Skip SSH key preflight entirely | would remove useful registration guidance for users with no registered keys. Confidence: medium Scope-risk: narrow Tested: PATH="/Users/jeonhwichan/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/VMware Fusion Tech Preview.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Users/jeonhwichan/.codex/tmp/arg0/codex-arg0DAF9FL:/Users/jeonhwichan/.nvm/versions/node/v20.19.4/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/path:/Users/jeonhwichan/.pyenv/shims:/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin:/opt/homebrew/opt/postgresql@16/bin:/opt/homebrew/opt/mysql@8.0/bin:/opt/homebrew/opt/curl/bin:/Users/jeonhwichan/development/flutter/bin:/opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/Users/jeonhwichan/go/bin:/Users/jeonhwichan/.opencode/bin:/opt/homebrew/share/google-cloud-sdk/bin:/Users/jeonhwichan/.bun/bin:/Users/jeonhwichan/.local/bin:/Users/jeonhwichan/.nvm/versions/node/v20.19.4/bin:/Users/jeonhwichan/.cargo/bin:/Applications/Ghostty.app/Contents/MacOS:/Users/jeonhwichan/Library/Application Support/JetBrains/Toolbox/scripts:/Users/jeonhwichan/.pub-cache/bin:/Users/jeonhwichan/Library/Android/sdk/platform-tools:/Users/jeonhwichan/Library/Application Support/JetBrains/Toolbox/scripts" cargo test
Author
|
This PR will need one of the release labels for the label-check workflow. I do not have permission to add labels on this repo; release/patch should be appropriate for this fix. |
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-add -Lwhen checking/registering SSH keys~/.ssh/*.pubkeys preferred when the same fingerprint is also exposed by the agent~/.sshFixes #870.
Testing
PATH="$HOME/.cargo/bin:$PATH" cargo test