jsch-agent-proxy -- a proxy to ssh-agent and Pageant in Java.

Description
===========
jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent and Pageant
included Putty.  It will be easily integrated into JSch, and users
will be allowed to use those programs in authentications.
This software has been developed for JSch, but it will be easily 
applicable to other ssh2 implementations in Java.
This software is licensed under BSD style license.


Build
=====

  $ git clone git://github.com/ymnk/jsch-agent-proxy.git
  $ cd jsch-agent-proxy
  $ mkdir lib
  $ (cd lib; \
     wget --no-check-certificate \
          https://github.com/downloads/twall/jna/jna.jar)
  $ (cd lib; \
     wget --no-check-certificate \
          https://github.com/downloads/twall/jna/platform.jar)
  $ (cd lib; \
     wget \
          http://sourceforge.net/projects/jsch/files/jsch.jar/0.1.48/jsch-0.1.48.jar)
  $ ant


Examples
========
  * examples/UsingPageant.java
    This sample demonstrates how to get accesses to Pageant.
    $ ant examples
    $ (cd examples; java -classpath "../lib/*:../dist/lib/*":. UsingPageant)
  * examples/UsingSSHAent.java
    This sample demonstrates how to get accesses to ssh-agent.
    $ ant examples
    $ (cd examples; java -classpath "../lib/*:../dist/lib/*":. UsingSSHAgent)
  * examples/JSchWithAgentProxy.java
    This sample demonstrates how to integrate jsch-agent-proxy into JSch.
    $ ant examples
    $ (cd examples; \
       java -classpath "../lib/*:../dist/lib/*":. \
            JSchWithAgentProxy foo@bar.com)


Dependencies
============
To work as a proxy to ssh-agent and Pageant,
the current implementation depends on the following software
  * JNA: https://github.com/twall/jna
  * junixsocket: http://code.google.com/p/junixsocket/

As for connections to ssh-agent, unix domain sockets must be
handled, and JNA or junixsocket have been used.
Refer to to following classes,
  * com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory[1]
  * com.jcraft.jsch.agentproxy.usocket.JUnixDomainSocketFactory[2]
If you can use JNA, the later is not needed.

As for connections to Pageant, win32 APIs on Windows must be
handled, and JNA has been used in the current implementation.
Refer to the following class,
  * com.jcraft.jsch.agentproxy.connector.PageantConnector[3]

If you want to be free from JNA and junixsocket,
implement following interfaces without them,
  * com.jcraft.jsch.agentproxy.Connector[4]
  * com.jcraft.jsch.agentproxy.USocketFactory[5]

[1] https://github.com/ymnk/jsch-agent-proxy/blob/master/src/main/java/com/jcraft/jsch/agentproxy/usocket/JNAUSocketFactory.java
[2] https://github.com/ymnk/jsch-agent-proxy/blob/master/src/main/java/com/jcraft/jsch/agentproxy/usocket/JUnixDomainSocketFactory.java
[3] https://github.com/ymnk/jsch-agent-proxy/blob/master/src/main/java/com/jcraft/jsch/agentproxy/connector/PageantConnector.java
[4] https://github.com/ymnk/jsch-agent-proxy/blob/master/src/main/java/com/jcraft/jsch/agentproxy/Connector.java
[5] https://github.com/ymnk/jsch-agent-proxy/blob/master/src/main/java/com/jcraft/jsch/agentproxy/USocketFactory.java
