Class KeyAgentIdentity
java.lang.Object
org.apache.sshd.client.auth.pubkey.KeyAgentIdentity
- All Implemented Interfaces:
PublicKeyIdentity
Uses an
SshAgent to generate the identity signature-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsign(SessionContext session, String algo, byte[] data) Proves the public key identity by signing the given datatoString()
-
Field Details
-
agent
-
keyPair
-
resolvedPair
-
comment
-
-
Constructor Details
-
KeyAgentIdentity
-
-
Method Details
-
getKeyIdentity
- Specified by:
getKeyIdentityin interfacePublicKeyIdentity- Returns:
- The
KeyPairidentity value
-
getComment
-
sign
public Map.Entry<String,byte[]> sign(SessionContext session, String algo, byte[] data) throws Exception Description copied from interface:PublicKeyIdentityProves the public key identity by signing the given data- Specified by:
signin interfacePublicKeyIdentity- Parameters:
session- TheSessionContextfor calling this method - may benullif not called within a session contextalgo- Recommended signature algorithm - ifnull/empty then one will be selected based on the key type and/or signature factories. Note: even if specific algorithm specified, the implementation may disregard and choose anotherdata- Data to sign- Returns:
- used algorithm + signed data - using the identity
- Throws:
Exception- If failed to sign the data
-
toString
-