public class ConsoleMultipleKnownHostsKeyVerification extends AbstractMultipleKnownHostsKeyVerification
Implements the AbstractKnownHostsKeyVerification to provide host key verification through the console.
Constructor and Description |
---|
ConsoleMultipleKnownHostsKeyVerification()
Deprecated.
Constructs the verification instance with the default known_hosts file
from $HOME/.ssh/known_hosts.
|
ConsoleMultipleKnownHostsKeyVerification(String knownhosts)
Deprecated.
Constructs the verification instance with the specified known_hosts
file.
|
Modifier and Type | Method and Description |
---|---|
void |
onHostKeyMismatch(String host,
List<SshPublicKey> pk,
SshPublicKey actual)
Deprecated.
Prompts the user through the console to verify the host key.
|
protected void |
onInvalidHostEntry(String entry)
Deprecated.
|
void |
onUnknownHost(String host,
SshPublicKey pk)
Deprecated.
Prompts the user through the console to verify the host key.
|
allowedHosts, allowHost, getKnownHostsFile, isHostFileWriteable, removeAllowedHost, saveHostFile, setHashHosts, toString, verifyHost
public ConsoleMultipleKnownHostsKeyVerification() throws SshException
Constructs the verification instance with the default known_hosts file from $HOME/.ssh/known_hosts.
InvalidHostFileException
- if the known_hosts file is invalid.SshException
public ConsoleMultipleKnownHostsKeyVerification(String knownhosts) throws SshException
Constructs the verification instance with the specified known_hosts file.
knownhosts
- the path to the known_hosts fileInvalidHostFileException
- if the known_hosts file is invalid.SshException
public void onHostKeyMismatch(String host, List<SshPublicKey> pk, SshPublicKey actual)
Prompts the user through the console to verify the host key.
onHostKeyMismatch
in class AbstractMultipleKnownHostsKeyVerification
host
- the name of the hostpk
- the current public key of the hostactual
- the actual public key supplied by the hostpublic void onUnknownHost(String host, SshPublicKey pk)
Prompts the user through the console to verify the host key.
onUnknownHost
in class AbstractMultipleKnownHostsKeyVerification
host
- the name of the hostpk
- the public key supplied by the hostprotected void onInvalidHostEntry(String entry) throws SshException
onInvalidHostEntry
in class AbstractMultipleKnownHostsKeyVerification
SshException
Copyright © 2024. All rights reserved.