Skip to content

Interface: HostKeyVerifier() ​

Defined in: netconf/src/transport/host-keys.ts:34

Your own host-key check, given as hostKey when connecting: return (or resolve) true to accept the key the server presented. See Host keys.

ts
HostKeyVerifier(info): boolean | Promise<boolean>;

Defined in: netconf/src/transport/host-keys.ts:36

Decide whether to trust the key; false fails the connection with a HostKeyError.

Parameters ​

info ​

HostKeyInfo

Returns ​

boolean | Promise<boolean>

Properties ​

knownKeyTypes? ​

ts
knownKeyTypes?: (host, port) => readonly string[] | Promise<readonly string[]>;

Defined in: netconf/src/transport/host-keys.ts:42

Optional: the key types (ssh-ed25519, ecdsa-sha2-nistp256, …) this policy holds for a host. The transport negotiates those first, as OpenSSH does, so a server with several host keys presents one that can be checked.

Parameters ​

host ​

string

port ​

number

Returns ​

readonly string[] | Promise<readonly string[]>

Released under the MIT Licence.