[JSch-users] SOLVED com.jcraft.jsch.JSchException: reject HostKey
Status: Alpha
Brought to you by:
ymnk
|
From: Heiner W. <Hei...@He...> - 2005-06-07 06:42:02
|
[ Just forwarding to the list, so you can see which cheat codes actualy work :) ] Michael Giroux wrote: > Thanks Heiner. Making an entry with fully qualified host name solved > the problem. > > Reading the docs again, I see that a fully qualified name was > expected. > The fact that it worked from command line threw me off that one. > > Michael > Heiner Westphal wrote: > >> I had some hassle with long/short hostnames depending on name >> resolution. >> I.e. sometimes I HAD to use myhost.mydomain.org, sometimes only >> the short form myhost worked. >> >> Use commandline ssh to long AND short hostname, so you get known_host >> entries always worked for me though (duplicating line in knonw_hosts >> and >> change of name will do as well, as the key does not change depending >> on long/short hostname). >> >> Hope this helps, >> >> Heiner >> >> Michael Giroux wrote: >>> >>> >>> >>> Using JSCH version 0.1.20, I am getting "reject HostKey" error when using >>> the ANT <scp> task. >>> >>> I am able to scp and ssh to the host using command line tools. >>> I can also scp using ANT <scp ... trust='yes'>. >>> >>> There is an entry in ${user.home}/.ssh/known_hosts for the host (which is >>> why the command line tools work). The entry in known_hosts appears as >>> "penguin1,xxx.xxx.xxx.xxx ssh-rsa ..." (w/ valid IP address) >>> >>> I checked FAQs, and it appears that the reject HostKey message is caused >>> by >>> either missing entry or wrong format in known_hosts, but I cannot find >>> any >>> info on: >>> a) what the correct format would look like >>> b) how to create an entry with correct format >>> >>> Any suggestions will be appreciated. >>> >>> Michael Giroux >>> >>> >>> |