Package com.sshtools.client
Class IdentityFileAuthenticator
java.lang.Object
com.sshtools.common.ssh.AbstractRequestFuture
com.sshtools.client.SimpleClientAuthenticator
com.sshtools.client.PublicKeyAuthenticator
com.sshtools.client.IdentityFileAuthenticator
- All Implemented Interfaces:
ClientAuthenticator
,com.sshtools.common.ssh.RequestFuture
Implements public key authentication, taking a java.io.File object as the source private key.
-
Field Summary
Fields inherited from class com.sshtools.client.PublicKeyAuthenticator
SSH_MSG_USERAUTH_PK_OK
-
Constructor Summary
ConstructorsConstructorDescriptionIdentityFileAuthenticator
(PassphrasePrompt passphrase) IdentityFileAuthenticator
(Collection<Path> identities, PassphrasePrompt passphrase) -
Method Summary
Modifier and TypeMethodDescriptioncollectIdentities
(boolean onlyWellKnown) void
done
(boolean success) protected com.sshtools.common.ssh.components.SshKeyPair
com.sshtools.common.ssh.components.SshPublicKey
protected com.sshtools.common.ssh.components.SshPublicKey
getPassphrase
(String keyinfo) protected boolean
Methods inherited from class com.sshtools.client.PublicKeyAuthenticator
authenticate, getName, getSignatureGenerator, onStartAuthentication, processMessage, sign
Methods inherited from class com.sshtools.client.SimpleClientAuthenticator
cancel, failure, getAuthenticationMethods, isCancelled, isMoreAuthenticationRequired, success, success
Methods inherited from class com.sshtools.common.ssh.AbstractRequestFuture
addFutureListener, isDone, isSuccess, waitFor, waitForever
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sshtools.client.ClientAuthenticator
cancel, failure, getAuthenticationMethods, isCancelled, isMoreAuthenticationRequired, success, success
Methods inherited from interface com.sshtools.common.ssh.RequestFuture
addFutureListener, isDone, isDoneAndSuccess, isSuccess, waitFor, waitForever
-
Constructor Details
-
IdentityFileAuthenticator
-
IdentityFileAuthenticator
- Throws:
IOException
-
-
Method Details
-
getPassphrase
-
getCurrentPath
-
getCurrentKey
public com.sshtools.common.ssh.components.SshPublicKey getCurrentKey() -
collectIdentities
- Throws:
IOException
-
done
public void done(boolean success) - Overrides:
done
in classcom.sshtools.common.ssh.AbstractRequestFuture
-
getNextKey
- Specified by:
getNextKey
in classPublicKeyAuthenticator
- Throws:
IOException
-
getAuthenticatingKey
protected com.sshtools.common.ssh.components.SshKeyPair getAuthenticatingKey() throws IOException, com.sshtools.common.publickey.InvalidPassphraseException- Specified by:
getAuthenticatingKey
in classPublicKeyAuthenticator
- Throws:
IOException
com.sshtools.common.publickey.InvalidPassphraseException
-
hasCredentialsRemaining
protected boolean hasCredentialsRemaining()- Specified by:
hasCredentialsRemaining
in classPublicKeyAuthenticator
-