diff --git a/docs/manual/OptionalTasks/scp.html b/docs/manual/OptionalTasks/scp.html index fc56228e3..dc8c03cbf 100644 --- a/docs/manual/OptionalTasks/scp.html +++ b/docs/manual/OptionalTasks/scp.html @@ -54,7 +54,7 @@ for more information.

the identity of the remote host. This must be a SSH2 format file. SSH1 format is not supported. No, defaults to - ${user.dir}/.ssh/known_hosts. + ${user.home}/.ssh/known_hosts. failonerror diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java index a943048ca..7f3e6470b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java @@ -118,7 +118,7 @@ public class Scp extends Task implements LogListener { * Sets the path to the file that has the identities of * all known hosts. This is used by SSH protocol to validate * the identity of the host. The default is - * {$user.dir}/.ssh/known_hosts. + * ${user.home}/.ssh/known_hosts. * @param knownHosts a path to the known hosts file. */ @@ -161,7 +161,7 @@ public class Scp extends Task implements LogListener { super.init(); this.toUri = 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.port = 22; this.fileSets = null;