Ant Version: 1.6.5
jsch version: jsch-0.1.32.jarls
i can ssh into the host using putty ,,, OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep
2006

Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: SC-Solaris-build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.2_10\jre
Detected OS: Windows 2003
parsing buildfile C:\ci\scripts\SC-Solaris-build.xml with URI =
file:///C:/ci/sc
ripts/SC-Solaris-build.xml
Project base dir set to: C:\ci\scripts
Build sequence for target(s) `SC-Solaris' is [SC-Solaris]
Complete build sequence is [SC-Solaris, ]

SC-Solaris:
  [sshexec] Connecting to supernova:22

BUILD FAILED
C:\ci\scripts\SC-Solaris-build.xml:7: com.jcraft.jsch.JSchException: reject
Host
Key: xxx
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:211)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: com.jcraft.jsch.JSchException: reject HostKey: supernova
        at com.jcraft.jsch.Session.checkHost(Session.java:706)
        at com.jcraft.jsch.Session.connect(Session.java:309)
        at com.jcraft.jsch.Session.connect(Session.java:145)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession
(SSHBas
e.java:180)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:143)
        ... 12 more
--- Nested Exception ---
com.jcraft.jsch.JSchException: reject HostKey: supernova
        at com.jcraft.jsch.Session.checkHost(Session.java:706)
        at com.jcraft.jsch.Session.connect(Session.java:309)
        at com.jcraft.jsch.Session.connect(Session.java:145)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession
(SSHBas
e.java:180)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(
SSHExec.ja
va:143)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 0 seconds



On 9/6/07, Anderson, Rob (Global Trade) <[EMAIL PROTECTED] > wrote:
>
> Usually this error is caused when you have not specified either
> trust="true" or knownhosts="something". You have set trust="true"
> though...I'm not sure what is causing the problem. Couple questions:
>
> What version of Ant? What version of jsch? Can you ssh into the host
> with an ssh client? What version is the ssh server? OpenSSH or other?
>
> Also, produce some output with -verbose and sent it.
>
> -Rob Anderson
>
> > -----Original Message-----
> > From: Shankar S [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 05, 2007 12:52 AM
> > To: Ant Users List
> > Subject: sshexec
> >
> > I have got the sshexec task in this format:
> >
> > <sshexec host="xxx" username="xxx" password="xxx" command="./xx.sh"
> > trust="true" />
> >
> > Ant throws up saying:
> >
> > com.jcraft.jsch.JSchException: reject HostKey: xxx
> >
> > Any help on this is much appreciated.
> >
> > -Shanki
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to