public class SftpHostVerification
extends com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
Constructor and Description |
---|
SftpHostVerification(String knownhosts)
Constructs the verification instance with the specified known_hosts
file.
|
Modifier and Type | Method and Description |
---|---|
void |
onHostKeyMismatch(String host,
com.sshtools.j2ssh.transport.publickey.SshPublicKey pk,
com.sshtools.j2ssh.transport.publickey.SshPublicKey actual)
Prompts the user through the console to verify the host key.
|
void |
onUnknownHost(String host,
com.sshtools.j2ssh.transport.publickey.SshPublicKey pk)
Prompts the user through the console to verify the host key.
|
public SftpHostVerification(String knownhosts) throws com.sshtools.j2ssh.transport.InvalidHostFileException
knownhosts
- the path to the known_hosts filecom.sshtools.j2ssh.transport.InvalidHostFileException
- if the known_hosts file is invalid.public void onHostKeyMismatch(String host, com.sshtools.j2ssh.transport.publickey.SshPublicKey pk, com.sshtools.j2ssh.transport.publickey.SshPublicKey actual)
onHostKeyMismatch
in class com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
host
- the name of the hostpk
- the current public key of the hostactual
- the actual public key supplied by the hostpublic void onUnknownHost(String host, com.sshtools.j2ssh.transport.publickey.SshPublicKey pk)
onUnknownHost
in class com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification
host
- the name of the hostpk
- the public key supplied by the hostCopyright © 2023 Frank!Framework. All rights reserved.