Browse Source

.ssh is in ${user.home}, not ${user.dir}.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274212 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
af734d01c1
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      docs/manual/OptionalTasks/scp.html
  2. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java

+ 1
- 1
docs/manual/OptionalTasks/scp.html View File

@@ -54,7 +54,7 @@ for more information.</p>
the identity of the remote host. This must be a SSH2 format file. the identity of the remote host. This must be a SSH2 format file.
SSH1 format is not supported.</td> SSH1 format is not supported.</td>
<td valian="top" align="center">No, defaults to <td valian="top" align="center">No, defaults to
${user.dir}/.ssh/known_hosts.</td>
${user.home}/.ssh/known_hosts.</td>
</tr> </tr>
<tr> <tr>
<td valign="top">failonerror</td> <td valign="top">failonerror</td>


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java View File

@@ -118,7 +118,7 @@ public class Scp extends Task implements LogListener {
* Sets the path to the file that has the identities of * Sets the path to the file that has the identities of
* all known hosts. This is used by SSH protocol to validate * all known hosts. This is used by SSH protocol to validate
* the identity of the host. The default is * the identity of the host. The default is
* <i>{$user.dir}/.ssh/known_hosts</i>.
* <i>${user.home}/.ssh/known_hosts</i>.


* @param knownHosts a path to the known hosts file. * @param knownHosts a path to the known hosts file.
*/ */
@@ -161,7 +161,7 @@ public class Scp extends Task implements LogListener {
super.init(); super.init();
this.toUri = null; this.toUri = null;
this.fromUri = null; this.fromUri = null;
this.knownHosts = System.getProperty("user.dir") + "/.ssh/known_hosts";
this.knownHosts = System.getProperty("user.home") + "/.ssh/known_hosts";
this.trust = false; this.trust = false;
this.port = 22; this.port = 22;
this.fileSets = null; this.fileSets = null;


Loading…
Cancel
Save