public interface SshHostKeyManager
| Modifier and Type | Method and Description |
|---|---|
void |
add(SshHostKey hostKey,
boolean persist)
Add a key, optionally persisting it to some kind of backing store.
|
SshHostKey[] |
getKeys()
Get all valid host keys.
|
SshHostKey[] |
getKeysForHost(java.lang.String host,
java.lang.String type)
Get all the keys that are valid for the specified host and key type.
|
boolean |
isWriteable()
Get if this host key manager allows keys to be persisted.
|
void |
remove(SshHostKey hostKey)
Remove a key.
|
SshHostKey[] getKeys()
SshHostKey objects.
This list will consist of both permanent and temporary keys and is
guaranteed to be non-null.void remove(SshHostKey hostKey) throws SshException
hostKey - key to removeSshExceptionboolean isWriteable()
add(SshHostKey, boolean)void add(SshHostKey hostKey, boolean persist) throws SshException
hostKey - key to addpersist - persist the keySshException - on any error adding the keySshHostKey[] getKeysForHost(java.lang.String host, java.lang.String type)
The returned list is guaranteed to be non-null, i.e. it will be empty if no matches are found.
host - host to matchtype - type (one of SshConfiguration#PUBLIC_KEY_SSHDSS or
SshConfiguration.PUBLIC_KEY_SSHRSA.Copyright © 2018. All rights reserved.