Skip to content

feat: add SSH config runtime foundation (#295) - #302

Merged
inureyes merged 1 commit into
mainfrom
feature/issue-295-ssh-config-foundation
Aug 27, 2026
Merged

feat: add SSH config runtime foundation (#295)#302
inureyes merged 1 commit into
mainfrom
feature/issue-295-ssh-config-foundation

Conversation

@inureyes

Copy link
Copy Markdown
Member

Summary

Changes

  • Classify every accepted keyword and alias as a concrete runtime consumer, delegated issue, or recognized unimplemented option, with invariants that reject duplicate or unsupported runtime claims.
  • Preserve actual nested Include path and line metadata in an internal structure, deduplicate canonical diagnostics once per parse, and route them through stderr or -E without trusting user-authored # Source: comments.
  • Resolve pre-Host globals, nested Include source order and caller context, Host/Match blocks, repeated -o Key=Value values, scalar first-obtained fields, additive fields, and SetEnv key-level first writes.
  • Implement OpenSSH replacement, append, remove, prepend, wildcard, order, deduplication, supported-name validation, fail-closed empty policies, and russh-required KEX extension preservation for Ciphers, MACs, KexAlgorithms, HostKeyAlgorithms, and PubkeyAcceptedAlgorithms.
  • Retry only DNS and TCP carrier creation for ConnectionAttempts, preserve the last typed source on exhaustion, apply TCPKeepAlive as a verified OS socket option, and preserve typed russh packet authentication, AEAD, packet-size, and padding failures in connection-local take-once state.
  • Share integrity state only within clones of one direct, ProxyCommand, jump, interactive, forwarding, command, or file-transfer Client; each new connection, reconnect, retry, jump hop, and destination gets a fresh state.

Compatibility notes

Validation

  • cargo test --lib ssh::ssh_config (230 passed)
  • cargo test --lib ssh::tokio_client::connection_tests (26 passed)
  • Focused algorithm, typed-error, connection-state, CLI, jump-chain, and provenance diagnostic tests (46 passed)
  • make openssh-regress-selftest (13 passed)
  • cargo fmt --all -- --check
  • cargo check --lib --bins --tests
  • cargo clippy --lib --bins --tests -- -D warnings
  • OpenSSH regressions integrity, try-ciphers, kextype, and keytype (4/4 passed)

Closes #295

Part of #281 and #275

@inureyes inureyes added type:enhancement New feature or request priority:high High priority issue status:review Under review labels Aug 27, 2026
@inureyes
inureyes force-pushed the feature/issue-295-ssh-config-foundation branch from be14191 to a7051f0 Compare August 27, 2026 10:51
Introduce a canonical accepted-keyword registry that distinguishes concrete runtime consumers, delegated first-wave work, and recognized-but-unimplemented options so unsupported behavior is never silently claimed.

Preserve structured Include provenance and OpenSSH first-obtained semantics across global, Host, Match, nested Include, SetEnv, and generic command-line overlays.

Wire validated cipher, MAC, KEX, host-key, and public-key policies into russh, implement bounded carrier retries and verified TCP keepalive, and preserve typed packet-integrity failures without retrying authentication or protocol failures.

Add the cross-phase OpenSSH -c and -m compatibility needed by the #295 named regressions; dedicated flags precede generic -o values, and unsupported or empty policies fail closed.

Validated with focused ssh_config, transport, algorithm, error, CLI, jump-chain, diagnostic, harness self-tests, scoped check/clippy, and the integrity, try-ciphers, kextype, and keytype regressions.

Refs #295
@inureyes
inureyes force-pushed the feature/issue-295-ssh-config-foundation branch from a7051f0 to b546991 Compare August 27, 2026 11:13
@inureyes inureyes added status:done Completed and removed status:review Under review labels Aug 27, 2026
@inureyes
inureyes merged commit 501f592 into main Aug 27, 2026
5 checks passed
@inureyes
inureyes deleted the feature/issue-295-ssh-config-foundation branch August 27, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high High priority issue status:done Completed type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ssh_config): add directive registry and transport runtime foundation

1 participant