Types
Key = public_key:public_key()
Normally an RSA, DSA or ECDSA public key, but handling of other public keys can be added.
Host = inet:ip_address() | inet:hostname() | [ inet:ip_address() | inet:hostname() ]
Description of the host with one or more IP addresses or hostnames.
Port = inet:port_number()
The Port number of the host.
Host key algorithm.
Result = boolean() | {error, Error::term()}
The exact error message depends on the actual callback module. The Error message makes the connection to fail, and is returned from e.g ssh:connect/3.
Checks if a host key is trusted.
This function is preferred to the old Module:is_host_key/4 since it also uses the peer host port number and may return an error message.
The OTP/SSH application first calls this function in the callback module, and then the old Module:is_host_key/4 for compatibility.