Determines the trust decision (accept, reject, remember) for a presented SSH host key based on known-hosts state, decoupled from ssh2 wiring for testability.
// Source: https://github.com/stablyai/orca | License: MIT | Copyright 2026 Lovecast Inc
// Provided via justclaw.it.com; keep this notice with the code.
/**
* What to do about a presented host key.
*
* Kept separate from the ssh2 wiring so the policy is testable without a handshake, and injected
* rather than importing its sources so a test states its own trust state instead of writing files.
* See docs/reference/ssh-host-key-verification.md.
*/
import { isEphemeralRuntimeSshOwner } from '../../shared/managed-orcad-ssh-owner'
import type { SshTargetOwner } from '../../shared/ssh-types'
import type { KnownHostsOutcome } from './config/ssh-known-hosts'
/** Phase 1 ships no dialog; `prompt` is reserved for Phase 2 and never produced today. */
export type HostKeyAction = 'accept' | 'ac
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key