Repository navigation
fix(ssh): honor configured host trust with accept-new by default - #120
Merged
Merged
Conversation
Deploying jetpack with
|
| Latest commit: |
25dcf48
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://43352a6c.jetpack-1ws.pages.dev |
| Branch Preview URL: | https://fix-openssh-host-trust.jetpack-1ws.pages.dev |
This was referenced Nov 4, 2026
Recheck every hostname and IP under the enrollment lock using the same policy. Cover changed hostname/unknown IP in both orders and a competing enrollment between validation passes. Refs #122.
Resolve the documented SSH config subset and shared known_hosts/KRL formats natively. Keep helper executables confined to explicit agent forwarding, and prove native commands/SFTP/trust work with an empty PATH. Document unsupported integration and move handwritten docs outside generated reference output. Refs #121.
11 tasks done
Keep username matches case-sensitive and reject host certificates without a matching principal. Verify certificate negotiation over a real native handshake before password authentication.
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
The native SSH handshake previously accepted every server key, including changed keys. Verify the server against existing OpenSSH trust files before authentication or remote execution.
The default behavior is accept-new: enroll unknown hosts, accept their stored keys on repeat connections, and reject changed keys. Explicit SSH config controls trust policy. Keep russh SSH/SFTP and existing native authentication, including agent key-comment selection.
Closes #110. Closes #121. Closes #122.
Validation
Supported configuration and limits
Read ~/.ssh/config then /etc/ssh/ssh_config, with first applicable value winning. A custom config replaces those sources. Supported rules: Host patterns/negation, Include with */? globs, and Match all/final/host/originalhost/user/localuser. Explicit Jetpack settings retain precedence. Native username matches and certificate principals are case-sensitive.
Supported settings: HostName, User, Port, StrictHostKeyChecking, HostKeyAlias, UserKnownHostsFile, GlobalKnownHostsFile, HashKnownHosts, CheckHostIP, explicit HostKeyAlgorithms lists, and RevokedHostKeys. Paths support quoting, ~/, environment expansion and %%/%d/%h/%n/%p/%r/%u tokens. Relative trust paths use the current working directory; relative Includes use ~/.ssh or /etc/ssh according to their source. Include depth is capped at 16.
The client is noninteractive: ask rejects unknown hosts. no/off permits changed keys without enrollment or credential/agent exposure. Unsupported Match criteria, DNS canonicalization, ProxyCommand, ProxyJump, KnownHostsCommand, VerifyHostKeyDNS, explicit CASignatureAlgorithms/RequiredRSASize restrictions, and HostKeyAlgorithms list modifiers fail explicitly. These are Jetpack integration limits, not fundamental russh restrictions. Identity selection remains controlled by Jetpack's existing native options. Unsupported path syntax and malformed/unsupported revocation formats fail closed.
Direct hashing dependencies already existed transitively; no new package versions enter the lockfile. Implementation details are recorded here; no standalone host-trust documentation page is added.