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

public abstract Class StaticServerKeyVerifier

extends AbstractLoggingBean
implements ServerKeyVerifier
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.keyverifier.ServerKeyVerifier
Known Direct Subclasses
org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier, org.apache.sshd.client.keyverifier.RejectAllServerKeyVerifier
Imports
java.net.SocketAddress, java.security.PublicKey, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.config.keys.KeyUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean

Returns the same constant answer true/false regardless
Author
Apache MINA SSHD Project

Field Summary

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

Constructor Summary

AccessConstructor and Description
protected
StaticServerKeyVerifier(boolean acceptance)

Method Summary

Modifier and TypeMethod and Description
protected void
handleAcceptance(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)

protected void
handleRejection(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)

public final boolean
public final 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

acceptanceback to summary
private final boolean acceptance

Constructor Detail

StaticServerKeyVerifierback to summary
protected StaticServerKeyVerifier(boolean acceptance)

Method Detail

handleAcceptanceback to summary
protected void handleAcceptance(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
handleRejectionback to summary
protected void handleRejection(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
isAcceptedback to summary
public final boolean isAccepted()
verifyServerKeyback to summary
public final 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