public class DelegatingServerKeyVerifier extends AbstractLoggingBean implements ServerKeyVerifier
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.log| Constructor and Description |
|---|
DelegatingServerKeyVerifier() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
verifyServerKey(ClientSession session,
SocketAddress remoteAddress,
PublicKey serverKey)
Verify that the server key provided is really the one of the host.
|
public boolean verifyServerKey(ClientSession session, SocketAddress remoteAddress, PublicKey serverKey)
ServerKeyVerifierverifyServerKey in interface ServerKeyVerifiersession - the current ClientSessionremoteAddress - the host's SocketAddressserverKey - the presented server PublicKeytrue if the key is accepted for the hostCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.