Class StaticServerKeyVerifier
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.client.keyverifier.StaticServerKeyVerifier
-
- All Implemented Interfaces:
ServerKeyVerifier
- Direct Known Subclasses:
AcceptAllServerKeyVerifier,RejectAllServerKeyVerifier
public abstract class StaticServerKeyVerifier extends AbstractLoggingBean implements ServerKeyVerifier
Returns the same constant answertrue/falseregardless- Author:
- Apache MINA SSHD Project
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStaticServerKeyVerifier(boolean acceptance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidhandleAcceptance(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)protected voidhandleRejection(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)booleanisAccepted()booleanverifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)Verify that the server key provided is really the one of the host.
-
-
-
Method Detail
-
isAccepted
public final boolean isAccepted()
-
verifyServerKey
public final boolean verifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
Description copied from interface:ServerKeyVerifierVerify that the server key provided is really the one of the host.- Specified by:
verifyServerKeyin interfaceServerKeyVerifier- Parameters:
sshClientSession- the currentClientSessionremoteAddress- the host'sSocketAddressserverKey- the presented serverPublicKey- Returns:
trueif the key is accepted for the host
-
handleAcceptance
protected void handleAcceptance(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
-
handleRejection
protected void handleRejection(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey)
-
-