com.sshtools.j2ssh.transport
Class IgnoreHostKeyVerification

java.lang.Object
  extended by com.sshtools.j2ssh.transport.IgnoreHostKeyVerification
All Implemented Interfaces:
HostKeyVerification

public class IgnoreHostKeyVerification
extends java.lang.Object
implements 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
IgnoreHostKeyVerification()
           
 
Method Summary
 boolean verifyHost(java.lang.String host, SshPublicKey pk)
           Simply returns true to all requests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreHostKeyVerification

public IgnoreHostKeyVerification()
Method Detail

verifyHost

public boolean verifyHost(java.lang.String host,
                          SshPublicKey pk)
                   throws TransportProtocolException

Simply returns true to all requests.

Specified by:
verifyHost in interface HostKeyVerification
Parameters:
host - the name of the host
pk - the hosts public key
Returns:
true
Throws:
TransportProtocolException - if an error occurs
Since:
0.2.0


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.