Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 17372 invoked from network); 8 Oct 2004 14:20:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Oct 2004 14:20:08 -0000 Received: (qmail 74680 invoked by uid 500); 8 Oct 2004 14:19:52 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 74514 invoked by uid 500); 8 Oct 2004 14:19:50 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 74499 invoked by uid 99); 8 Oct 2004 14:19:50 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [209.226.175.54] (HELO tomts10-srv.bellnexxia.net) (209.226.175.54) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 08 Oct 2004 07:19:49 -0700 Received: from athlon ([64.231.167.220]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with SMTP id <20041008141945.QQJ2048.tomts10-srv.bellnexxia.net@athlon> for ; Fri, 8 Oct 2004 10:19:45 -0400 Message-ID: <00b301c4ad41$dde023f0$0d02a8c0@athlon> From: "Rhino" To: "Ant Users List" References: <00a601c4ad41$16e2ac50$0d02a8c0@athlon> Subject: Re: Scp problem Date: Fri, 8 Oct 2004 10:19:47 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00B0_01C4AD20.56A9E4F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_00B0_01C4AD20.56A9E4F0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Please ignore this question; I solved my problem already. I found my = answer in the Ant Manual: I don't know how I missed this! Rhino ----- Original Message -----=20 From: Rhino=20 To: ant-user=20 Sent: Friday, October 08, 2004 10:14 AM Subject: Scp problem I am trying the optional Scp task for the first time but it isn't = working too well. I need some help. I downloaded jsch-0.1.17.jar from = http://www.jcraft.com/jsch/index.html and put it in my ant/lib = directory. This is my Ant script except that I have spoofed the userid = and password for obvious reasons: = -------------------------------------------------------------------------= ---------------------- Experiment with optional Ant tasks that use SSH. = -------------------------------------------------------------------------= ---------------------- This is the result I get: = -------------------------------------------------------------------------= ---------------------- D:\RDS\xml>ant -f ssh.xml -debug -verbose Apache Ant version 1.6.1 compiled on February 12 2004 Apache Ant version 1.6.1 compiled on February 12 2004 Buildfile: ssh.xml Detected Java version: 1.4 in: C:\j2sdk1.4.1_02\jre Detected OS: Windows XP parsing buildfile D:\RDS\xml\ssh.xml with URI =3D = file:///D:/RDS/xml/ssh.xml Project base dir set to: D:\RDS\xml Build sequence for target `scp' is [scp] Complete build sequence is [scp, sshexec, ] scp: [scp] Connecting to tonge.ca:22 BUILD FAILED D:\RDS\xml\ssh.xml:14: com.jcraft.jsch.JSchException: reject HostKey at = org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:129) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:301) at org.apache.tools.ant.Target.performTasks(Target.java:328) at = org.apache.tools.ant.Project.executeTarget(Project.java:1215) at = org.apache.tools.ant.Project.executeTargets(Project.java:1063) at org.apache.tools.ant.Main.runBuild(Main.java:632) at org.apache.tools.ant.Main.startAnt(Main.java:183) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56) Caused by: com.jcraft.jsch.JSchException: reject HostKey at com.jcraft.jsch.Session.checkHost(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at = org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBa e.java:167) at = org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:190) at = org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:118) ... 10 more --- Nested Exception --- com.jcraft.jsch.JSchException: reject HostKey at com.jcraft.jsch.Session.checkHost(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at = org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBa e.java:167) at = org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:190) at = org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:118) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:301) at org.apache.tools.ant.Target.performTasks(Target.java:328) at = org.apache.tools.ant.Project.executeTarget(Project.java:1215) at = org.apache.tools.ant.Project.executeTargets(Project.java:1063) at org.apache.tools.ant.Main.runBuild(Main.java:632) at org.apache.tools.ant.Main.startAnt(Main.java:183) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56) Total time: 2 seconds D:\RDS\xml> = -------------------------------------------------------------------------= ---------------------- What did I do wrong and how do I fix it? When I searched the archives for this mailing list, I found a note = that said you need to have a hosts file that is visible to the script = but the reply didn't make it clear (to me) how that is done. The local file is on my Windows XP machine; the remote server is = running Linux Mandrake 9.1. Rhino --- rhino1 AT sympatico DOT ca "There are two ways of constructing a software design. One way is to = make it so simple that there are obviously no deficiencies. And the = other way is to make it so complicated that there are no obvious = deficiencies." - C.A.R. Hoare ------=_NextPart_000_00B0_01C4AD20.56A9E4F0--