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.
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 Summary
Modifier and TypeMethodDescriptionvoidreceiveNewHostKeys(ClientSession session, Collection<PublicKey> hostKeys) Invoked when new keys have been received and verified.
-
Method Details
-
receiveNewHostKeys
Invoked when new keys have been received and verified.If this method updates the
known_hostsfile 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- theClientSessionthat 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; nevernulland never containingnull; may contain host certificates
-