matchKnownHosts
function matchKnownHosts( entries: readonly KnownHostsEntry[], host: string, port?: number): KnownHostsEntry[];Defined in: src/profiles/importers/KnownHostsParser.ts:133
Filters parsed entries down to those that match the given host/port. Negations are honored.
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
entries | readonly KnownHostsEntry[] | undefined | Entries returned by parseKnownHosts. |
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”Matching entries in source order.