Package com.sshtools.common.hosts
Class DialogKnownHostsKeyVerification
java.lang.Object
com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
com.sshtools.common.hosts.DialogKnownHostsKeyVerification
- All Implemented Interfaces:
HostKeyVerification
- Version:
- $Revision: 1.13 $
- Author:
- $author$
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DialogKnownHostsKeyVerification object.DialogKnownHostsKeyVerification(Component parent, String hostFileName) Creates a new DialogKnownHostsKeyVerification object. -
Method Summary
Modifier and TypeMethodDescriptionvoidonDeniedHost(String host) voidonHostKeyMismatch(String host, SshPublicKey recorded, SshPublicKey actual) Called by theverifyHostmethod when the host key supplied by the host does not match the current key recording in the known hosts file.voidonUnknownHost(String host, SshPublicKey key) Called by theverifyHostmethod when the host key supplied is not recorded in the known_hosts file.voidsetVerificationEnabled(boolean enabled) Methods inherited from class com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
allowedHosts, allowHost, isHostFileWriteable, removeAllowedHost, saveHostFile, toString, verifyHost
-
Constructor Details
-
DialogKnownHostsKeyVerification
Creates a new DialogKnownHostsKeyVerification object.- Parameters:
parent-- Throws:
InvalidHostFileException
-
DialogKnownHostsKeyVerification
public DialogKnownHostsKeyVerification(Component parent, String hostFileName) throws InvalidHostFileException Creates a new DialogKnownHostsKeyVerification object.- Parameters:
parent-hostFileName-- Throws:
InvalidHostFileException
-
-
Method Details
-
setVerificationEnabled
public void setVerificationEnabled(boolean enabled) - Parameters:
enabled-
-
onDeniedHost
- Parameters:
host-- Throws:
TransportProtocolException
-
onHostKeyMismatch
public void onHostKeyMismatch(String host, SshPublicKey recorded, SshPublicKey actual) throws TransportProtocolException Description copied from class:AbstractKnownHostsKeyVerificationCalled by the
verifyHostmethod when the host key supplied by the host does not match the current key recording in the known hosts file.- Specified by:
onHostKeyMismatchin classAbstractKnownHostsKeyVerification- Parameters:
host-recorded-actual-- Throws:
TransportProtocolException
-
onUnknownHost
Description copied from class:AbstractKnownHostsKeyVerificationCalled by the
verifyHostmethod when the host key supplied is not recorded in the known_hosts file.- Specified by:
onUnknownHostin classAbstractKnownHostsKeyVerification- Parameters:
host-key-- Throws:
TransportProtocolException
-