Interface ModifiedServerKeyAcceptor
- All Known Implementing Classes:
DefaultKnownHostsServerKeyVerifier
,KnownHostsServerKeyVerifier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptModifiedServerKey
(ClientSession clientSession, SocketAddress remoteAddress, KnownHostEntry entry, PublicKey expected, PublicKey actual) Invoked when a matching known host key was found but it does not match the presented one.
-
Method Details
-
acceptModifiedServerKey
boolean acceptModifiedServerKey(ClientSession clientSession, SocketAddress remoteAddress, KnownHostEntry entry, PublicKey expected, PublicKey actual) throws Exception Invoked when a matching known host key was found but it does not match the presented one.- Parameters:
clientSession
- TheClientSession
remoteAddress
- The remote host addressentry
- Any originalKnownHostEntry
whose key did not matchexpected
- Any expected serverPublicKey
actual
- The presented serverPublicKey
- Returns:
true
if accept the server key anyway- Throws:
Exception
- if cannot process the request - equivalent tofalse
return value
-