ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Atsuhiko Yamanaka" <>
Subject Re: Scp: reject HostKey error?
Date Wed, 19 Apr 2006 04:18:08 GMT

2005/12/21, Rhino <>:
> I am puzzled by an error I get from my scp task that doesn't afflict my
> sshexec task, even though they use the same properties. Here is the relevant
> property (with my hostname munged for security)and my target:
> -------------------------------
> <property name="server.hostname" value=""/>
> <!--other properties-->
> <target name="upload-Bongo2">
> <sshexec host="${server.hostname}" username="${userid}" trust="true"
>                keyfile="${server.keyfile}" passphrase="${server.passphrase}"
>               command="touch somefile2"/>
> <scp file="build.xml"
>         todir="${userid}@${server.hostname}:/home/rhino"
>         keyfile="${server.keyfile}" passphrase="${server.passphrase}"/>
> </target>

> And here is my error message, again with the host name munged for security:
> -------------------------------
> E:\eclipse\3.1.1\eclipse\workspace\Resume_JDK_1.5.0\xml\scp.xml:229:
> com.jcraft.jsch.JSchException: reject HostKey:
> at

I guess that the reason for your fail is that your scp task does not have
'trust="true"' attribute setting. Please add it and try again.

In current implementation, for each scp/sshexec task, a ssh session
will be established
and not be shared with other scp/sshexecs.
The caching and sharing ssh sessions will improve the perfomance and save
the CPU time usage, so it should be implemeted, IMHO.

Atsuhiko Yamanaka
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
Fax +81-22-224-8773
Skype callto://jcraft/

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message