Package org.apache.sshd.agent
Interface SshAgent
- All Superinterfaces:
AutoCloseable
,Channel
,Closeable
- All Known Implementing Classes:
AbstractAgentProxy
,AgentDelegate
,AgentImpl
SSH key agent server
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIdentity
(KeyPair key, String comment) void
void
removeIdentity
(PublicKey key) sign
(SessionContext session, PublicKey key, String algo, byte[] data)
-
Field Details
-
SSH_AUTHSOCKET_ENV_NAME
- See Also:
-
-
Method Details
-
getIdentities
- Throws:
IOException
-
sign
Map.Entry<String,byte[]> sign(SessionContext session, PublicKey key, String algo, byte[] data) throws IOException - Parameters:
session
- The currentSessionContext
key
- ThePublicKey
to use for signingalgo
- 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:
IOException
- If failed to sign
-
addIdentity
- Throws:
IOException
-
removeIdentity
- Throws:
IOException
-
removeAllIdentities
- Throws:
IOException
-