Interface NewHostKeysHandler

All Known Implementing Classes:
DefaultNewHostKeysHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface NewHostKeysHandler
A handler that knows what to do when a ClientSession got new host keys from a server via the OpenSSH "hostkeys-00@openssh.com" host key rotation extension.
Author:
Apache MINA SSHD Project
See Also:
  • Method Details

    • receiveNewHostKeys

      void receiveNewHostKeys(ClientSession session, Collection<PublicKey> hostKeys)
      Invoked when new keys have been received and verified.

      If this method updates the known_hosts file or other key database with the new keys, it is recommended to do so in a separate thread to avoid blocking the calling thread.

      Parameters:
      session - the ClientSession that received the keys; can be used to figure out which server sent these keys (via the session's host config entry or server address)
      hostKeys - the verified host keys received; never null and never containing null; may contain host certificates