Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Help Reqd on Scp & Sshexec...Can 't get them to run

Help Reqd on Scp & Sshexec...Can 't get them to run

2004-02-12       - By Thind, Aman
Reply:     1     2     3  

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



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.