Top Description Fields Constructors Methods
org.apache.sshd.client.keyverifier

public Class RequiredServerKeyVerifier

extends AbstractLoggingBean
implements ServerKeyVerifier
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.keyverifier.ServerKeyVerifier
Imports
java.net.SocketAddress, java.security.PublicKey, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.util.buffer.BufferUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean

A ServerKeyVerifier that accepts one server key (specified in the constructor)
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final PublicKey
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final PublicKey
public boolean
verifyServerKey(ClientSession
the current ClientSession
sshClientSession
,
SocketAddress
the host's SocketAddress
remoteAddress
,
PublicKey
the presented server PublicKey
serverKey
)

Implements org.apache.sshd.client.keyverifier.ServerKeyVerifier.verifyServerKey.

Verify that the server key provided is really the one of the host.

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

requiredKeyback to summary
private final PublicKey requiredKey

Constructor Detail

RequiredServerKeyVerifierback to summary
public RequiredServerKeyVerifier(PublicKey requiredKey)

Method Detail

getRequiredKeyback to summary
public final PublicKey getRequiredKey()
verifyServerKeyback to summary
public boolean verifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)

Implements org.apache.sshd.client.keyverifier.ServerKeyVerifier.verifyServerKey.

Doc from org.apache.sshd.client.keyverifier.ServerKeyVerifier.verifyServerKey.

Verify that the server key provided is really the one of the host.

Parameters
sshClientSession:ClientSession

the current ClientSession

remoteAddress:SocketAddress

the host's SocketAddress

serverKey:PublicKey

the presented server PublicKey

Returns:boolean

true if the key is accepted for the host

Annotations
@Override