net.schmizz.sshj.transport.verification
Interface HostKeyVerifier
- All Known Implementing Classes:
- ConsoleKnownHostsVerifier, OpenSSHKnownHosts, PromiscuousVerifier
public interface HostKeyVerifier
Host key verification interface.
Method Summary |
boolean |
verify(String hostname,
int port,
PublicKey key)
This callback is invoked when the server's host key needs to be verified. |
verify
boolean verify(String hostname,
int port,
PublicKey key)
- This callback is invoked when the server's host key needs to be verified. The return value indicates to the
caller whether the SSH connection should proceed.
Note: host key verification is the basis for security in SSH, therefore exercise due caution in
implementing!
- Parameters:
hostname
- remote hostnameport
- remote portkey
- host key of server
- Returns:
true
if key is acceptable, false
otherwise
Copyright © 2009-2012. All Rights Reserved.