public interface ServerKeyDatabase
Connection addresses are given as strings of the format
[hostName]:port if using a non-standard port (i.e., not port 22),
otherwise just hostname.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ServerKeyDatabase.Configuration
A simple provider for ssh config settings related to host key checking.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.lang.String connectAddress,
java.net.InetSocketAddress remoteAddress,
java.security.PublicKey serverKey,
ServerKeyDatabase.Configuration config,
CredentialsProvider provider)
Determines whether to accept a received server host key.
|
java.util.List<java.security.PublicKey> |
lookup(java.lang.String connectAddress,
java.net.InetSocketAddress remoteAddress,
ServerKeyDatabase.Configuration config)
Retrieves all known host keys for the given addresses.
|
@NonNull java.util.List<java.security.PublicKey> lookup(@NonNull java.lang.String connectAddress, @NonNull java.net.InetSocketAddress remoteAddress, @NonNull ServerKeyDatabase.Configuration config)
connectAddress - IP address the session tried to connect toremoteAddress - IP address as reported for the remote end pointconfig - giving access to potentially interesting configuration
settingsboolean accept(@NonNull java.lang.String connectAddress, @NonNull java.net.InetSocketAddress remoteAddress, @NonNull java.security.PublicKey serverKey, @NonNull ServerKeyDatabase.Configuration config, CredentialsProvider provider)
connectAddress - IP address the session tried to connect toremoteAddress - IP address as reported for the remote end pointserverKey - received from the remote endconfig - giving access to potentially interesting configuration
settingsprovider - for interacting with the user, if required; may be
nulltrue if the serverKey is accepted, false
otherwise