diff --git a/WHATSNEW b/WHATSNEW index 35f8ec82a..790ac949e 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -56,6 +56,11 @@ Other changes: individually before concatenating them. Bugzilla Report 64855 + * the ssh tasks now share a new nested element additionalConfig that + can be used to set config values for the jsch Session used by the + task. + Bugzilla Report 65089 + Changes from Ant 1.10.8 TO Ant 1.10.9 ===================================== diff --git a/manual/Tasks/scp.html b/manual/Tasks/scp.html index a9a95a12d..e9e4a33eb 100644 --- a/manual/Tasks/scp.html +++ b/manual/Tasks/scp.html @@ -217,6 +217,31 @@ set.
Prior to Ant 1.9.7 only <fileset>
has been supported as a nested element.
since Ant 1.10.10
+ +Adds configuration settings for the JSch Session created that are + not directly supported by specific Ant attributes.
+ +Attribute | +Description | +Required | +
---|---|---|
key | +The key of the configuration setting. | +Yes | +
value | +The value of the configuration setting. | +Yes | +
Copy a single local file to a remote machine:
<scp file="myfile.txt" todir="user:password@somehost:/home/chuck"/>diff --git a/manual/Tasks/sshexec.html b/manual/Tasks/sshexec.html index 6437b4608..f0a0e9c40 100644 --- a/manual/Tasks/sshexec.html +++ b/manual/Tasks/sshexec.html @@ -230,6 +230,33 @@ JSCh earlier than 0.1.28. +
since Ant 1.10.10
+ +Adds configuration settings for the JSch Session created that are + not directly supported by specific Ant attributes.
+ +Attribute | +Description | +Required | +
---|---|---|
key | +The key of the configuration setting. | +Yes | +
value | +The value of the configuration setting. | +Yes | +
Run a command on a remote machine using password authentication
diff --git a/manual/Tasks/sshsession.html b/manual/Tasks/sshsession.html index 6f557bb72..c8cf29118 100644 --- a/manual/Tasks/sshsession.html +++ b/manual/Tasks/sshsession.html @@ -186,6 +186,31 @@ both sets of tunnels will be established. +since Ant 1.10.10
+ +Adds configuration settings for the JSch Session created that are + not directly supported by specific Ant attributes.
+ +Attribute | +Description | +Required | +
---|---|---|
key | +The key of the configuration setting. | +Yes | +
value | +The value of the configuration setting. | +Yes | +
The sequential
element is a required parameter. It is a container for nested Tasks
which are to be executed once the SSH connection is established and all local and/or remote tunnels
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
index 4987d0501..9677901b4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
@@ -20,12 +20,15 @@ package org.apache.tools.ant.taskdefs.optional.ssh;
import java.io.File;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
import com.jcraft.jsch.ConfigRepository;
import com.jcraft.jsch.OpenSSHConfig;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Environment.Variable;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
@@ -50,6 +53,7 @@ public abstract class SSHBase extends Task implements LogListener {
private String sshConfig;
private int serverAliveCountMax = 3;
private int serverAliveIntervalSeconds = 0;
+ private final Map