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(SshKeyPair... keys) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(TransportProtocolClient transport,
java.lang.String username)
Start the authentication
|
java.lang.String |
getName()
The authentication mechanism name/.
|
protected void |
onStartAuthentication(Connection<SshClientContext> con) |
boolean |
processMessage(com.sshtools.common.util.ByteArrayReader msg)
Process an authentication message.
|
void |
setKeyPair(SshKeyPair... keys) |
byte[] |
sign(SshPrivateKey prv,
java.lang.String signingAlgorithm,
byte[] data) |
cancel, failure, getAuthenticationMethods, isCancelled, isMoreAuthenticationRequired, success, successaddFutureListener, done, isDone, isSuccess, waitFor, waitForeverclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, failure, getAuthenticationMethods, isCancelled, isMoreAuthenticationRequired, success, successaddFutureListener, isDone, isSuccess, waitFor, waitForeverpublic static final int SSH_MSG_USERAUTH_PK_OK
public PublicKeyAuthenticator()
public PublicKeyAuthenticator(SshKeyPair... keys)
public void setKeyPair(SshKeyPair... keys)
public void authenticate(TransportProtocolClient transport, java.lang.String username) throws java.io.IOException, SshException
ClientAuthenticatorauthenticate in interface ClientAuthenticatorjava.io.IOExceptionSshExceptionprotected void onStartAuthentication(Connection<SshClientContext> con)
public boolean processMessage(com.sshtools.common.util.ByteArrayReader msg)
throws java.io.IOException,
SshException
ClientAuthenticatorprocessMessage in interface ClientAuthenticatorprocessMessage in class SimpleClientAuthenticatorjava.io.IOExceptionSshExceptionpublic byte[] sign(SshPrivateKey prv, java.lang.String signingAlgorithm, byte[] data) throws SshException
SshExceptionpublic java.lang.String getName()
ClientAuthenticatorgetName in interface ClientAuthenticatorCopyright © 2022. All rights reserved.