Index: src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
===================================================================
--- src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java	(revision 1478900)
+++ src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java	(working copy)
@@ -47,6 +47,8 @@
 
     private int port = -1;
 
+    private boolean allowedAgentUse = false;
+
     public AbstractSshBasedRepository() {
         super();
     }
@@ -106,7 +108,7 @@
              }
         }
         return SshCache.getInstance().getSession(host, port, user, userPassword, getKeyFile(),
-            getKeyFilePassword(), getPassFile());
+            getKeyFilePassword(), getPassFile(), isAllowedAgentUse());
     }
 
     /**
@@ -299,6 +301,22 @@
         return passFile;
     }
 
+    /**
+     * @return
+     * 	          Whether use of a local SSH agent for authentication is allowed
+     */
+    public boolean isAllowedAgentUse() {
+        return allowedAgentUse;
+    }
+
+    /**
+     * @param allowedAgentUse
+     * 	          Whether use of a local SSH agent for authentication is allowed
+     */
+    public void setAllowedAgentUse(boolean allowedAgentUse) {
+        this.allowedAgentUse = allowedAgentUse;
+    }
+
     protected abstract String getRepositoryScheme();
 
 }
Index: src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
===================================================================
--- src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java	(revision 1478900)
+++ src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java	(working copy)
@@ -17,13 +17,14 @@
  */
 package org.apache.ivy.plugins.repository.ssh;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-
+import com.jcraft.jsch.*;
+import com.jcraft.jsch.agentproxy.AgentProxyException;
+import com.jcraft.jsch.agentproxy.Connector;
+import com.jcraft.jsch.agentproxy.RemoteIdentityRepository;
+import com.jcraft.jsch.agentproxy.USocketFactory;
+import com.jcraft.jsch.agentproxy.connector.PageantConnector;
+import com.jcraft.jsch.agentproxy.connector.SSHAgentConnector;
+import com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory;
 import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.event.IvyEvent;
 import org.apache.ivy.core.event.IvyListener;
@@ -33,12 +34,12 @@
 import org.apache.ivy.util.CredentialsUtil;
 import org.apache.ivy.util.Message;
 
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
 
 /**
  * a class to cache SSH Connections and Channel for the SSH Repository each session is defined by
@@ -106,7 +107,7 @@
         /**
          * attach an sftp channel to this cache entry
          * 
-         * @param channelSftp
+         * @param newChannel
          *            to attach
          */
         public void setChannelSftp(ChannelSftp newChannel) {
@@ -287,6 +288,34 @@
     }
 
     /**
+     * Attempts to connect to a local SSH agent (using either UNIX sockets or PuTTY's Pageant)
+     *
+     * @param jsch
+     *          Connection to be attached to an available local agent
+     * @return
+     *          true if connected to agent, false otherwise
+     */
+    private boolean attemptAgentUse(JSch jsch) {
+        try {
+            Connector con;
+            if (SSHAgentConnector.isConnectorAvailable()) {
+                USocketFactory usf = new JNAUSocketFactory();
+                con = new SSHAgentConnector(usf);
+            } else if(PageantConnector.isConnectorAvailable()) {
+                con = new PageantConnector();
+            } else {
+                Message.verbose(":: SSH :: No agent available");
+                return false;
+            }
+            jsch.setIdentityRepository(new RemoteIdentityRepository(con));
+            return true;
+        } catch(AgentProxyException e) {
+            Message.verbose(":: SSH :: Failure connecting to agent :: " + e.toString());
+            return false;
+        }
+    }
+
+    /**
      * Gets a session from the cache or establishes a new session if necessary
      * 
      * @param host
@@ -303,10 +332,12 @@
      *            to use for accessing the pemFile (optional)
      * @param passFile
      *            to store credentials
+     * @param allowedAgentUse
+     *            Whether to communicate with an agent for authentication
      * @return session or null if not successful
      */
     public Session getSession(String host, int port, String username, String userPassword,
-            File pemFile, String pemPassword, File passFile) throws IOException {
+            File pemFile, String pemPassword, File passFile, boolean allowedAgentUse) throws IOException {
         Checks.checkNotNull(host, "host");
         Checks.checkNotNull(username, "user");
         Entry entry = getCacheEntry(username, host, port);
@@ -323,6 +354,9 @@
                 } else {
                     session = jsch.getSession(username, host);
                 }
+                if (allowedAgentUse) {
+                    attemptAgentUse(jsch);
+                }
                 if (pemFile != null) {
                     jsch.addIdentity(pemFile.getAbsolutePath(), pemPassword);
                 }
Index: src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
===================================================================
--- src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java	(revision 1478900)
+++ src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java	(working copy)
@@ -17,11 +17,11 @@
  */
 package org.apache.ivy.plugins.resolver;
 
-import java.io.File;
-
 import org.apache.ivy.core.settings.IvySettings;
 import org.apache.ivy.plugins.repository.ssh.AbstractSshBasedRepository;
 
+import java.io.File;
+
 /**
  * Abstract base class for all resolvers using SSH All necessary connection parameters can be set
  * here via attributes. However all attributes defined in the pattern url of the resolver will have
@@ -56,6 +56,16 @@
     }
 
     /**
+     * Determines whether a local SSH agent may be used for authentication
+     *
+     * @param allowedAgentUse
+     *            true if an agent may be used if available
+     */
+    public void setAllowedAgentUse(boolean allowedAgentUse) {
+        getSshBasedRepository().setAllowedAgentUse(allowedAgentUse);
+    }
+
+    /**
      * Optional password file. If set the repository will use it as an encypted property file, to
      * load username and passwd entries, and to store them if the user choose to do so. Defaults to
      * user.dir/.ivy/[host].sftp.passwd, set it to null to disable this feature.
Index: ivy.xml
===================================================================
--- ivy.xml	(revision 1478900)
+++ ivy.xml	(working copy)
@@ -16,9 +16,7 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<ivy-module version="1.0"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"            
-            xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+<ivy-module version="1.0">
 	<info organisation="org.apache.ivy"
 	       module="ivy"
 	       status="integration">
@@ -50,6 +48,11 @@
 		<dependency org="oro" name="oro" rev="2.0.8" conf="default,oro->default"/>
 		<dependency org="commons-vfs" name="commons-vfs" rev="1.0" conf="default,vfs->default" />
 		<dependency org="com.jcraft" name="jsch" rev="0.1.31" conf="default,sftp->default" />
+		<dependency org="com.jcraft" name="jsch.agentproxy" rev="0.0.5" conf="default,sftp->default" />
+		<dependency org="com.jcraft" name="jsch.agentproxy.sshagent" rev="0.0.5" conf="default,sftp->default" />
+		<dependency org="com.jcraft" name="jsch.agentproxy.usocket-jna" rev="0.0.5" conf="default,sftp->default" />
+		<dependency org="com.jcraft" name="jsch.agentproxy.jsch" rev="0.0.5" conf="default,sftp->default" />
+		<dependency org="com.jcraft" name="jsch.agentproxy.pageant" rev="0.0.5" conf="default,sftp->default" />
 		<dependency org="org.bouncycastle" name="bcpg-jdk14" rev="1.45" conf="default" />
         <dependency org="org.bouncycastle" name="bcprov-jdk14" rev="1.45" conf="default" />
 
