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)
ServerKeyVerifier
verifyServerKey
in interface ServerKeyVerifier
session
- the current ClientSession
remoteAddress
- the host's SocketAddress
serverKey
- the presented server PublicKey
true
if the key is accepted for the hostCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.