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)
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal PublicKey
boolean
verifyServerKey
(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey) Verify that the server key provided is really the one of the host.
-
Constructor Details
-
RequiredServerKeyVerifier
-
-
Method Details
-
getRequiredKey
-
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 interfaceServerKeyVerifier
- Parameters:
sshClientSession
- the currentClientSession
remoteAddress
- the host'sSocketAddress
serverKey
- the presented serverPublicKey
- Returns:
true
if the key is accepted for the host
-