public class PublicKeyAuthenticator extends SimpleClientAuthenticator implements ClientAuthenticator
Modifier and Type | Field and Description |
---|---|
static int |
SSH_MSG_USERAUTH_PK_OK |
Constructor and Description |
---|
PublicKeyAuthenticator() |
PublicKeyAuthenticator(com.sshtools.common.ssh.components.SshKeyPair... keys) |
Modifier and Type | Method and Description |
---|---|
protected void |
addKeyPair(com.sshtools.common.ssh.components.SshKeyPair key) |
void |
authenticate(TransportProtocolClient transport,
java.lang.String username)
Start the authentication
|
java.lang.String |
getName()
The authentication mechanism name/.
|
protected void |
onStartAuthentication(com.sshtools.synergy.ssh.Connection<SshClientContext> con) |
boolean |
processMessage(com.sshtools.common.util.ByteArrayReader msg)
Process an authentication message.
|
void |
setKeyPair(com.sshtools.common.ssh.components.SshKeyPair... keys) |
byte[] |
sign(com.sshtools.common.ssh.components.SshPrivateKey prv,
java.lang.String signingAlgorithm,
byte[] data) |
cancel, failure, getAuthenticationMethods, isCancelled, isMoreAuthenticationRequired, success, success
addFutureListener, done, isDone, isSuccess, waitFor, waitForever
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancel, failure, getAuthenticationMethods, isCancelled, isMoreAuthenticationRequired, success, success
public static final int SSH_MSG_USERAUTH_PK_OK
public PublicKeyAuthenticator()
public PublicKeyAuthenticator(com.sshtools.common.ssh.components.SshKeyPair... keys)
public void setKeyPair(com.sshtools.common.ssh.components.SshKeyPair... keys)
protected void addKeyPair(com.sshtools.common.ssh.components.SshKeyPair key)
public void authenticate(TransportProtocolClient transport, java.lang.String username) throws java.io.IOException, com.sshtools.common.ssh.SshException
ClientAuthenticator
authenticate
in interface ClientAuthenticator
java.io.IOException
com.sshtools.common.ssh.SshException
protected void onStartAuthentication(com.sshtools.synergy.ssh.Connection<SshClientContext> con)
public boolean processMessage(com.sshtools.common.util.ByteArrayReader msg) throws java.io.IOException, com.sshtools.common.ssh.SshException
ClientAuthenticator
processMessage
in interface ClientAuthenticator
processMessage
in class SimpleClientAuthenticator
java.io.IOException
com.sshtools.common.ssh.SshException
public byte[] sign(com.sshtools.common.ssh.components.SshPrivateKey prv, java.lang.String signingAlgorithm, byte[] data) throws com.sshtools.common.ssh.SshException
com.sshtools.common.ssh.SshException
public java.lang.String getName()
ClientAuthenticator
getName
in interface ClientAuthenticator
Copyright © 2023. All rights reserved.