Function is_server_known

Source
pub(crate) fn is_server_known<'a>(
    entries: impl Iterator<Item = &'a Entry>,
    host: &str,
    port: u16,
    key: &PublicKey,
) -> bool
Expand description

Checks whether a set of server details can be found in SSH known_hosts data.

Based on a host and its port, this function evaluates whether a supplied key is part of a list of entries in the SSH known_hosts file format. Returns true, if the combination of key, host and port matches an entry in the list of entries and that entry is not a CA key or a revoked key. Returns false in all other cases.