|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sshtools.publickey.AbstractKnownHostsKeyVerification
com.sshtools.publickey.ConsoleKnownHostsKeyVerification
public class ConsoleKnownHostsKeyVerification
Implements the AbstractKnownHostsKeyVerification to provide host key verification through the console.
| Constructor Summary | |
|---|---|
ConsoleKnownHostsKeyVerification()
Constructs the verification instance with the default known_hosts file from $HOME/.ssh/known_hosts. |
|
ConsoleKnownHostsKeyVerification(java.lang.String knownhosts)
Constructs the verification instance with the specified known_hosts file. |
|
| Method Summary | |
|---|---|
void |
onHostKeyMismatch(java.lang.String host,
SshPublicKey pk,
SshPublicKey actual)
Prompts the user through the console to verify the host key. |
protected void |
onInvalidHostEntry(java.lang.String entry)
|
void |
onUnknownHost(java.lang.String host,
SshPublicKey pk)
Prompts the user through the console to verify the host key. |
| Methods inherited from class com.sshtools.publickey.AbstractKnownHostsKeyVerification |
|---|
allowedHosts, allowHost, getKnownHostsFile, isHostFileWriteable, removeAllowedHost, saveHostFile, setHashHosts, toString, verifyHost |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConsoleKnownHostsKeyVerification()
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 ConsoleKnownHostsKeyVerification(java.lang.String knownhosts)
throws SshException
Constructs the verification instance with the specified known_hosts file.
knownhosts - the path to the known_hosts file
InvalidHostFileException - if the known_hosts file is invalid.
SshException| Method Detail |
|---|
public void onHostKeyMismatch(java.lang.String host,
SshPublicKey pk,
SshPublicKey actual)
Prompts the user through the console to verify the host key.
onHostKeyMismatch in class AbstractKnownHostsKeyVerificationhost - the name of the hostpk - the current public key of the hostactual - the actual public key supplied by the host
public void onUnknownHost(java.lang.String host,
SshPublicKey pk)
Prompts the user through the console to verify the host key.
onUnknownHost in class AbstractKnownHostsKeyVerificationhost - the name of the hostpk - the public key supplied by the host
protected void onInvalidHostEntry(java.lang.String entry)
throws SshException
onInvalidHostEntry in class AbstractKnownHostsKeyVerificationSshException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||