Class RequiredServerKeyVerifier
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.client.keyverifier.RequiredServerKeyVerifier
- All Implemented Interfaces:
ServerKeyVerifier
A ServerKeyVerifier that accepts one server key (specified in the constructor)
-
Field Summary
FieldsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal PublicKeybooleanverifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey) Verify that the server key provided is really the one of the host.
-
Field Details
-
requiredKey
-
-
Constructor Details
-
RequiredServerKeyVerifier
-
-
Method Details
-
getRequiredKey
-
verifyServerKey
public 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
-