Package com.sshtools.j2ssh.transport
Class IgnoreHostKeyVerification
java.lang.Object
com.sshtools.j2ssh.transport.IgnoreHostKeyVerification
- All Implemented Interfaces:
HostKeyVerification
A simple host key verification implementation that automatically approves the servers host key. It should be noted that using this implementation will render the protocol insecure against active attacks.
- Since:
- 0.2.0
- Version:
- $Revision: 1.15 $
- Author:
- Lee David Painter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
verifyHost
(String host, SshPublicKey pk) Simply returnstrue
to all requests.
-
Constructor Details
-
IgnoreHostKeyVerification
public IgnoreHostKeyVerification()
-
-
Method Details
-
verifyHost
Simply returns
true
to all requests.- Specified by:
verifyHost
in interfaceHostKeyVerification
- Parameters:
host
- the name of the hostpk
- the hosts public key- Returns:
true
- Throws:
TransportProtocolException
- if an error occurs- Since:
- 0.2.0
-