[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1829
  • Last Modified:

Ant SSHEXEC: Reject Host Key

Hi,

  This is regarding the sshexec optional task in ant.  I am using this task for quite sometime.  When I execute my ssh task in ant from command prompt it works fine (file gets transfered to remote system).  Now I have automated the task by scheduling using anthill running on top of tomcat.  Tomcat is running as a windows service.  When I execute the same task using tomcat I get the following error

Caught exception: reject HostKey

Its basically unable to find the ssh key file id_dsa.  Can someone tell me if there is anything needed to be added and am missing something out.  I am sure that this works when executed from command prompt.

Let me know.

Sri
0
sramaswam
Asked:
sramaswam
1 Solution
 
sigmaconCommented:
Try copying the file (the actual key store in which the host key is 'remembered') into the conf or lib directories of your tomcat installation and see whether that fixes it. If not, find some other way to make the file part of the class path. The ant task also has a parameter that allows you to specify the exact location of the private keyfile. If you want to use this option, make sure that whatever you put there can be seen and accessed from Tomcat. If that still doesn't help let me know.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now