matchKnownHostsEntry
function matchKnownHostsEntry( entry: KnownHostsEntry, host: string, port?: number): boolean;Defined in: src/profiles/importers/KnownHostsParser.ts:105
Returns true when the given host (and optional port) matches the entry’s host patterns. Hashed entries use HMAC-SHA1 verification per OpenSSH semantics.
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
entry | KnownHostsEntry | undefined | Parsed known_hosts entry to test. |
host | string | undefined | Hostname or IP literal to match. |
port | number | DEFAULT_SSH_PORT | Optional connection port. Defaults to DEFAULT_SSH_PORT. |
Returns
Section titled “Returns”boolean
Whether the entry matches and is not negated.