Class DefaultNewHostKeysHandler
java.lang.Object
org.apache.sshd.client.config.DefaultNewHostKeysHandler
- All Implemented Interfaces:
NewHostKeysHandler
A default
NewHostKeysHandler that registers the new host keys on the session.- Author:
- Apache MINA SSHD Project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreceiveNewHostKeys(ClientSession session, Collection<PublicKey> hostKeys) Invoked when new keys have been received and verified.
-
Constructor Details
-
DefaultNewHostKeysHandler
public DefaultNewHostKeysHandler()
-
-
Method Details
-
receiveNewHostKeys
Description copied from interface:NewHostKeysHandlerInvoked 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.- Specified by:
receiveNewHostKeysin interfaceNewHostKeysHandler- 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
-