Save This Page
Home » j2ssh-0.2.9-src » com.sshtools.j2ssh.agent » [javadoc | source]
com.sshtools.j2ssh.agent
public class: SshAgentClient [javadoc | source]
java.lang.Object
   com.sshtools.j2ssh.agent.SshAgentClient
Provides a client connection to the ssh agent.
Field Summary
public static final  String HASH_AND_SIGN    The hash and sign private key operation 
 InputStream in     
 OutputStream out     
 boolean isForwarded     
 HashMap messages     
 Socket socket     
Constructor:
 SshAgentClient(boolean isForwarded,
    String application,
    Socket socket) throws IOException 
 SshAgentClient(boolean isForwarded,
    String application,
    InputStream in,
    OutputStream out) throws IOException 
Method from com.sshtools.j2ssh.agent.SshAgentClient Summary:
addKey,   close,   connectAgentSocket,   connectLocalAgent,   deleteAllKeys,   deleteKey,   getRandomData,   hashAndSign,   listKeys,   lockAgent,   ping,   readMessage,   registerMessages,   sendForwardingNotice,   sendMessage,   sendVersionRequest,   unlockAgent
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sshtools.j2ssh.agent.SshAgentClient Detail:
 public  void addKey(SshPrivateKey prvkey,
    SshPublicKey pubkey,
    String description,
    KeyConstraints constraints) throws IOException 
    Add a key to the agent
 public  void close() 
    Close the agent
 public static Socket connectAgentSocket(String location) throws IOException, AgentNotAvailableException 
    Connect a socket to the agent at the location specified.
 public static SshAgentClient connectLocalAgent(String application,
    String location) throws IOException, AgentNotAvailableException 
    Connect to the local agent.
 public  void deleteAllKeys() throws IOException 
    Delete all the keys held by the agent.
 public  void deleteKey(SshPublicKey key,
    String description) throws IOException 
    Delete a key held by the agent
 public byte[] getRandomData(int count) throws IOException 
    Request some random data from the remote side
 public byte[] hashAndSign(SshPublicKey key,
    byte[] data) throws IOException 
    Request a hash and sign operation be performed for a given public key.
 public Map listKeys() throws IOException 
    List all the keys on the agent.
 public boolean lockAgent(String password) throws IOException 
    Lock the agent
 public  void ping(byte[] padding) throws IOException 
    Ping the remote side with some random padding data
 protected SubsystemMessage readMessage() throws InvalidMessageException 
    Read a single message from the inputstream and convert into a valid subsystem message
 protected  void registerMessages() 
    Register the subsystem messages
 protected  void sendForwardingNotice() throws IOException 
    Send a forwarding notice.
 protected  void sendMessage(SubsystemMessage msg) throws IOException 
    Send a subsystem message
 protected  void sendVersionRequest(String application) throws IOException 
    Request the agent version.
 public boolean unlockAgent(String password) throws IOException 
    Unlock the agent