public class ConsoleHostKeyValidator extends java.lang.Object implements SshHostKeyValidator
SshHostKeyManager is provided, then the keys can be persisted
and checked against the a store of known keys.STATUS_HOST_CHANGED, STATUS_HOST_KEY_UNKNOWN, STATUS_HOST_KEY_VALID| Constructor and Description |
|---|
ConsoleHostKeyValidator()
Constructor without host key manager.
|
ConsoleHostKeyValidator(SshHostKeyManager keyManager)
Constructor using a host key manager.
|
| Modifier and Type | Method and Description |
|---|---|
int |
verifyHost(SshHostKey hostKey)
Validate the provided host key and return one of
SshHostKeyValidator.STATUS_HOST_CHANGED, SshHostKeyValidator.STATUS_HOST_KEY_UNKNOWN or
SshHostKeyValidator.STATUS_HOST_KEY_VALID. |
public ConsoleHostKeyValidator()
public ConsoleHostKeyValidator(SshHostKeyManager keyManager)
keyManager - host key manager.public int verifyHost(SshHostKey hostKey) throws SshException
SshHostKeyValidatorSshHostKeyValidator.STATUS_HOST_CHANGED, SshHostKeyValidator.STATUS_HOST_KEY_UNKNOWN or
SshHostKeyValidator.STATUS_HOST_KEY_VALID.verifyHost in interface SshHostKeyValidatorhostKey - keySshExceptionCopyright © 2018. All rights reserved.