Class DelegatingServerKeyVerifier
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.client.keyverifier.DelegatingServerKeyVerifier
- All Implemented Interfaces:
ServerKeyVerifier
A
ServerKeyVerifier
that delegates verification to the instance found in the ClientSession
metadata
The verifier can be specified at the SshClient
level, which may have connections to multiple hosts. This
technique lets each connection have its own verifier instance.-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
verifyServerKey
(ClientSession session, SocketAddress remoteAddress, PublicKey serverKey) Verify that the server key provided is really the one of the host.
-
Constructor Details
-
DelegatingServerKeyVerifier
public DelegatingServerKeyVerifier()
-
-
Method Details
-
verifyServerKey
public boolean verifyServerKey(ClientSession session, 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:
session
- the currentClientSession
remoteAddress
- the host'sSocketAddress
serverKey
- the presented serverPublicKey
- Returns:
true
if the key is accepted for the host
-