I am trying to use 'jsch-0.1.12' together with the 'sshexec' task in ANT =
and I get an JSchException with the message 'reject HostKey'.
The ANT task runned looks like this, but with other usernames and =
On the console I get this error log :=20
[sshexec] Connecting to 192.168.0.13:22
C:\system\testing.xml:30: com.jcraft.jsch.JSchException: reject HostKey
I am using putty to connect with SSH and using the same username and =
and it works.
Anyone that have any idea why this happens?
+-From: "Kenneth Ljunggren" <kenneth@...> --
|_Date: Mon, 12 Jan 2004 12:06:20 +0100 ___________
|I am trying to use 'jsch-0.1.12' together with the 'sshexec' task
|in ANT = 1.6.0 and I get an JSchException with the message 'reject
|The ANT task runned looks like this, but with other usernames and
|<sshexec host="somehost" username="test" password="secret"
| command="touch somefile"/>
Please refer to
I guess that error will be resolved by adding the attribute 'knownhosts'.
If your 'know_hosts' file does not include the host-key of remote host,
the attribute 'trust="yes"' must be also added.