You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Thind, Aman" <am...@fidelity.co.in> on 2004/02/12 19:58:21 UTC

RE: Help Reqd on Scp & Sshexec...{Can't} Can get them to run :)

HURRAY :)

Rob and Jan

Thank you so so so much

I had been struggling at this for like days...

Earlier I was trying Perl Net::SSH module to work it out but it slowly got
out of hand

Saw that ant can do this so was grappling with it the whole day searching
through the list archives ( read a few mails by rob :) till I decided to
directly seek help of the mailing list...and this was my first mail !

I cannot thank you enough.

Cheers !
aman

-----Original Message-----
From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com] 
Sent: 12 February 2004 23:44
To: Ant Users List
Subject: RE: Help Reqd on Scp & Sshexec...Can't get them to run


Use ant the compile the jsch stuff. After unzipping the file
jsch-0.1.13.zip, cd to jsch-0.1.13 and run "ant dist". Then copy the jar
from dist/lib/ to $ANT_HOME/lib.

In your build.xml you have not specified a known_hosts file. Therefore the
remote host key is being rejected...

"J:\build.xml:5: com.jcraft.jsch.JSchException: reject HostKey"

You should change your target to...

<sshexec host="my_ip"
	trust="true"
 	username="my_username"
 	password="my_passwd"
 	command="touch somefile"/>

-Rob Anderson

> -----Original Message-----
> From: Thind, Aman [mailto:aman.thind@fidelity.co.in]
> Sent: Thursday, February 12, 2004 9:42 AM
> To: 'user@ant.apache.org'
> Subject: Help Reqd on Scp & Sshexec...Can't get them to run
> 
> 
> Hello Friends,
> 
> I have a two point task I intend to accomplish through ant :
> 
> 1) Copy a tarball to a unix box using Scp
> 
> 2) Issue an untar command to that unix box using Sshexec
> 
> The ant script shall run on my windows machine.
> 
> For these tasks I downloaded the jsch-0.1.13.zip from
> http://www.jcraft.com/jsch/ <http://www.jcraft.com/jsch/> 
> This does not include the jsch.jar so I compiled it by -
> javac com/jcraft/jsch/*.java com/jcraft/jsch/jce/*.java and then
> Jar -cvf jsch.jar *
> And placed the jar in the ant/lib folder
> Now when I try to run the sshexec task by the build file :
> (all ip etc info replaced)
> -------------------------------------------------------
> <project name="MyProject" default="dist" basedir=".">
> <sshexec host="my_ip"
> 	username="my_username"
> 	password="my_passwd"
> 	command="touch somefile"/>
> </project>
> ----------------------------------------------------------
> I get the error :
> -------------------------------------------------------------
> J:\>ant
> Buildfile: build.xml
>   [sshexec] Connecting to my_ip:22
> BUILD FAILED
> J:\build.xml:5: com.jcraft.jsch.JSchException: reject HostKey
> Total time: 9 seconds
> -----------------------------------------------------------------
> Can someone please shed some light on this and point me in the correct
> direction.
> A link to precompiled jsch.jar could be helpful to rule out 
> any issues in my
> building of the jar.
> Thank you all so much
> -aman
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org