org.apache.sshd.agent
Class AgentServer

java.lang.Object
  extended by org.apache.sshd.agent.AgentServer
All Implemented Interfaces:
SshAgent

public class AgentServer
extends Object
implements SshAgent

A server for an SSH Agent


Nested Class Summary
protected static class AgentServer.SshAgentSession
           
 
Nested classes/interfaces inherited from interface org.apache.sshd.agent.SshAgent
SshAgent.Pair<U,V>
 
Field Summary
 
Fields inherited from interface org.apache.sshd.agent.SshAgent
SSH_AUTHSOCKET_ENV_NAME
 
Constructor Summary
AgentServer()
           
 
Method Summary
 void addIdentity(KeyPair key, String comment)
           
 void close()
           
 List<SshAgent.Pair<PublicKey,String>> getIdentities()
           
 void removeAllIdentities()
           
 void removeIdentity(PublicKey key)
           
 byte[] sign(PublicKey key, byte[] data)
           
 String start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentServer

public AgentServer()
Method Detail

start

public String start()
             throws Exception
Throws:
Exception

close

public void close()
Specified by:
close in interface SshAgent

getIdentities

public List<SshAgent.Pair<PublicKey,String>> getIdentities()
                                                    throws IOException
Specified by:
getIdentities in interface SshAgent
Throws:
IOException

sign

public byte[] sign(PublicKey key,
                   byte[] data)
            throws IOException
Specified by:
sign in interface SshAgent
Throws:
IOException

addIdentity

public void addIdentity(KeyPair key,
                        String comment)
                 throws IOException
Specified by:
addIdentity in interface SshAgent
Throws:
IOException

removeIdentity

public void removeIdentity(PublicKey key)
                    throws IOException
Specified by:
removeIdentity in interface SshAgent
Throws:
IOException

removeAllIdentities

public void removeAllIdentities()
                         throws IOException
Specified by:
removeAllIdentities in interface SshAgent
Throws:
IOException


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.