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 | Class and Description |
|---|---|
| public static interface | ServerKeyDatabase.
A simple provider for ssh config settings related to host key checking. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the serverKey is accepted, false
otherwiseIP address the session tried to connect to connectAddress, InetSocketAddress IP address as reported for the remote end point remoteAddress, PublicKey received from the remote end serverKey, ServerKeyDatabase.giving access to potentially interesting configuration
settings config,for interacting with the user, if required; may be
provider)nullDetermines whether to accept a received server host key. |
| public List | Returns: the list of known and not revoked keys for the given addressesIP address the session tried to connect to connectAddress, InetSocketAddress IP address as reported for the remote end point remoteAddress, ServerKeyDatabase.giving access to potentially interesting configuration
settings configRetrieves all known and not revoked host keys for the given addresses. |
| accept | back to summary |
|---|---|
| public boolean accept(String connectAddress, InetSocketAddress remoteAddress, PublicKey serverKey, ServerKeyDatabase. Determines whether to accept a received server host key.
| |
| lookup | back to summary |
|---|---|
| public List Retrieves all known and not revoked host keys for the given addresses.
| |
ServerKeyDatabase#lookup(String, InetSocketAddress, Configuration)
and
ServerKeyDatabase#accept(String, InetSocketAddress, PublicKey, Configuration, CredentialsProvider).
| Modifier and Type | Class and Description |
|---|---|
| public static enum | ServerKeyDatabase.
The possible values for the "StrictHostKeyChecking" ssh config. |
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: the list as configured, with ~ already replacedRetrieves the list of file names from the "GlobalKnownHostsFile" ssh config. |
| public boolean | Returns: true if new entries should be stored with hashed host
information, false otherwiseObtains the value of the "HashKnownHosts" ssh config. |
| public ServerKeyDatabase. | Returns: theStrictHostKeyCheckingObtains the value of the "StrictHostKeyChecking" ssh config. |
| public List | Returns: the list as configured, with ~ already replacedRetrieves the list of file names from the "UserKnownHostsFile" ssh config. |
| public String |
| getGlobalKnownHostsFiles | back to summary |
|---|---|
| public List Retrieves the list of file names from the "GlobalKnownHostsFile" ssh config. | |
| getHashKnownHosts | back to summary |
|---|---|
| public boolean getHashKnownHosts() Obtains the value of the "HashKnownHosts" ssh config.
| |
| getStrictHostKeyChecking | back to summary |
|---|---|
| public ServerKeyDatabase. Obtains the value of the "StrictHostKeyChecking" ssh config.
| |
| getUserKnownHostsFiles | back to summary |
|---|---|
| public List Retrieves the list of file names from the "UserKnownHostsFile" ssh config. | |
| getUsername | back to summary |
|---|---|
| public String getUsername() Obtains the user name used in the connection attempt. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ServerKeyDatabase. | ACCEPT_ANY
"no", "off": always accept new or mismatched keys. |
| public static final ServerKeyDatabase. | ACCEPT_NEW
"accept-new": accept new keys, but never accept modified keys. |
| public static final ServerKeyDatabase. | ASK
"ask"; default: ask the user whether to accept (and store) a new or mismatched key. |
| public static final ServerKeyDatabase. | REQUIRE_MATCH
"yes", "on": never accept new or mismatched keys. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ServerKeyDatabase. | |
| public static ServerKeyDatabase. |
| ACCEPT_ANY | back to summary |
|---|---|
| public static final ServerKeyDatabase. "no", "off": always accept new or mismatched keys. | |
| ACCEPT_NEW | back to summary |
|---|---|
| public static final ServerKeyDatabase. "accept-new": accept new keys, but never accept modified keys. | |
| ASK | back to summary |
|---|---|
| public static final ServerKeyDatabase. "ask"; default: ask the user whether to accept (and store) a new or mismatched key. | |
| REQUIRE_MATCH | back to summary |
|---|---|
| public static final ServerKeyDatabase. "yes", "on": never accept new or mismatched keys. | |
| StrictHostKeyChecking | back to summary |
|---|---|
| private StrictHostKeyChecking() | |
| valueOf | back to summary |
|---|---|
| public static ServerKeyDatabase. | |
| values | back to summary |
|---|---|
| public static ServerKeyDatabase. | |