Skip to content

parseKnownHosts

function parseKnownHosts(text: string): KnownHostsEntry[];

Defined in: src/profiles/importers/KnownHostsParser.ts:39

Parses OpenSSH known_hosts content into structured entries. Comment and blank lines are skipped. Lines that cannot be parsed are silently dropped so callers can tolerate hand-edited files.

ParameterTypeDescription
textstringRaw known_hosts file contents.

KnownHostsEntry[]

Parsed entries in source order.