org.apache.sshd.client.keyverifier
Class RequiredServerKeyVerifier

java.lang.Object
  extended by org.apache.sshd.client.keyverifier.RequiredServerKeyVerifier
All Implemented Interfaces:
ServerKeyVerifier

public class RequiredServerKeyVerifier
extends Object
implements ServerKeyVerifier

A ServerKeyVerifier that accepts one server key (specified in the constructor)

Author:
Apache MINA SSHD Project

Field Summary
protected  org.slf4j.Logger log
           
 
Constructor Summary
RequiredServerKeyVerifier(PublicKey requiredKey)
           
 
Method Summary
 boolean verifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
          Verify that the server key provided is really the one of the host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log
Constructor Detail

RequiredServerKeyVerifier

public RequiredServerKeyVerifier(PublicKey requiredKey)
Method Detail

verifyServerKey

public boolean verifyServerKey(ClientSession sshClientSession,
                               SocketAddress remoteAddress,
                               PublicKey serverKey)
Description copied from interface: ServerKeyVerifier
Verify that the server key provided is really the one of the host.

Specified by:
verifyServerKey in interface ServerKeyVerifier
Parameters:
sshClientSession - the current session
remoteAddress - the host
serverKey - the presented key
Returns:
true if the key is accepted for the host


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.