Skip to content

feat(bssh): verify known host keys#399

Merged
ryanbreen merged 1 commit into
mainfrom
feat/bssh-known-hosts-verify
May 31, 2026
Merged

feat(bssh): verify known host keys#399
ryanbreen merged 1 commit into
mainfrom
feat/bssh-known-hosts-verify

Conversation

@ryanbreen
Copy link
Copy Markdown
Owner

Summary

  • exposes server host-key identity from client KEX
  • adds bssh known_hosts-style verification at /tmp/bssh_known_hosts by default, with --known-hosts override
  • TOFU-pins unknown hosts, silently accepts matching pinned hosts, and refuses mismatched pins before auth/channel setup

Validation

  • cargo check --manifest-path libs/libbreenix/Cargo.toml --features std
  • userspace/programs/build.sh --arch aarch64
  • cargo build --release --features testing,external_test_bins --bin qemu-uefi (warning scan empty)
  • Parallels proof via Breenix bsshd exec into bssh targeting operator Mac sshd 10.0.1.210:22:
    • Case A first connect: empty known_hosts, pinned [10.0.1.210]:22, returned Darwin, exit 0
    • Case B strict reverify: reused the pinned key without re-pinning, returned Darwin, exit 0
    • Case C tampered pin: wrong Breenix key pinned for [10.0.1.210]:22, bssh refused with host key verification failed, no BSSH_EXEC_BEGIN, exit 1

Artifacts: /Users/wrb/Downloads/Ralph/breenix-interrupt-io-roadmap-1780056222/turn93-artifacts

Add client-side host-key verification with a known_hosts-style store, TOFU pinning on first connect, strict re-verification, and mismatch refusal before auth/channel setup.

Validated against the operator Mac sshd with first-pin, strict reverify, and tampered-pin refusal transcripts.

Co-authored-by: Ryan Breen <ryan@breen.com>

Co-authored-by: Claude Code <noreply@anthropic.com>
@ryanbreen ryanbreen merged commit e9d7b56 into main May 31, 2026
@ryanbreen ryanbreen deleted the feat/bssh-known-hosts-verify branch May 31, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant