You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Andriy Kro <an...@gmail.com> on 2009/01/27 11:16:42 UTC

SFTP. HostKey verification error

Hi,

I use such a configuration to poll our sftp-server:

<route id="sftp_poller">
<from
uri="sftp://test@192.168.1.10/var/test/in?password=test&amp;binary=true&amp;consumer.delay=1000"/>
<to uri="file://c:/2"/>
</route>

When I try to use it I got such error:

[sftp://test@192.168.1.10/var/test/in]: reject HostKey: 192.168.1.10
com.jcraft.jsch.JSchException: reject HostKey: 192.168.1.10
        at com.jcraft.jsch.Session.checkHost(Session.java:700)
        at com.jcraft.jsch.Session.connect(Session.java:307)
        at com.jcraft.jsch.Session.connect(Session.java:150)
        at
org.apache.camel.component.file.remote.SftpConsumer.connectIfNecessary(SftpConsumer.java:73)
        at
org.apache.camel.component.file.remote.SftpConsumer.poll(SftpConsumer.java:96)
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)

How can I fix this?
-- 
View this message in context: http://www.nabble.com/SFTP.-HostKey-verification-error-tp21682724s22882p21682724.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: SFTP. HostKey verification error

Posted by Ramon Buckland <ra...@gmail.com>.
A rejection of a known_host under *nix ssh'ing is due to the "host key" of
the remote server (where you are connecting to) differing to the one you
have stored locally (thus a known host).

Under ssh, if the remote system obtains a different host key (such as the
server is rebuilt, or another takes the same IP address) then the known host
key will differ.s

A quick scan of jsch documentation notes that it uses .ssh/known_hosts when
not specified.
Just try ssh-ing into the server from where you run camel.

On Tue, Jan 27, 2009 at 21:22, Claus Ibsen <cl...@gmail.com> wrote:

> What does google say?
>
> Maybe the remote SFTP server does not accept your IP or something.
>
> There are some parameters to SFTP to set a known hosts file etc.
> http://camel.apache.org/ftp.html
>
>
> On Tue, Jan 27, 2009 at 11:16 AM, Andriy Kro <an...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I use such a configuration to poll our sftp-server:
> >
> > <route id="sftp_poller">
> > <from
> > uri="sftp://
> test@192.168.1.10/var/test/in?password=test&amp;binary=true&amp;consumer.delay=1000
> "/>
> > <to uri="file://c:/2"/>
> > </route>
> >
> > When I try to use it I got such error:
> >
> > [sftp://test@192.168.1.10/var/test/in]: reject HostKey: 192.168.1.10
> > com.jcraft.jsch.JSchException: reject HostKey: 192.168.1.10
> >        at com.jcraft.jsch.Session.checkHost(Session.java:700)
> >        at com.jcraft.jsch.Session.connect(Session.java:307)
> >        at com.jcraft.jsch.Session.connect(Session.java:150)
> >        at
> >
> org.apache.camel.component.file.remote.SftpConsumer.connectIfNecessary(SftpConsumer.java:73)
> >        at
> >
> org.apache.camel.component.file.remote.SftpConsumer.poll(SftpConsumer.java:96)
> >        at
> >
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> >
> > How can I fix this?
> > --
> > View this message in context:
> http://www.nabble.com/SFTP.-HostKey-verification-error-tp21682724s22882p21682724.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>

Re: SFTP. HostKey verification error

Posted by Claus Ibsen <cl...@gmail.com>.
What does google say?

Maybe the remote SFTP server does not accept your IP or something.

There are some parameters to SFTP to set a known hosts file etc.
http://camel.apache.org/ftp.html


On Tue, Jan 27, 2009 at 11:16 AM, Andriy Kro <an...@gmail.com> wrote:
>
> Hi,
>
> I use such a configuration to poll our sftp-server:
>
> <route id="sftp_poller">
> <from
> uri="sftp://test@192.168.1.10/var/test/in?password=test&amp;binary=true&amp;consumer.delay=1000"/>
> <to uri="file://c:/2"/>
> </route>
>
> When I try to use it I got such error:
>
> [sftp://test@192.168.1.10/var/test/in]: reject HostKey: 192.168.1.10
> com.jcraft.jsch.JSchException: reject HostKey: 192.168.1.10
>        at com.jcraft.jsch.Session.checkHost(Session.java:700)
>        at com.jcraft.jsch.Session.connect(Session.java:307)
>        at com.jcraft.jsch.Session.connect(Session.java:150)
>        at
> org.apache.camel.component.file.remote.SftpConsumer.connectIfNecessary(SftpConsumer.java:73)
>        at
> org.apache.camel.component.file.remote.SftpConsumer.poll(SftpConsumer.java:96)
>        at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>
> How can I fix this?
> --
> View this message in context: http://www.nabble.com/SFTP.-HostKey-verification-error-tp21682724s22882p21682724.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: SFTP. HostKey verification error

Posted by Andriy Kro <an...@gmail.com>.
I fixed this myself. My SFTP server required to be in known_hosts file on my
client machine.


Andriy Kro wrote:
> 
> Hi,
> 
> I use such a configuration to poll our sftp-server:
> 
> <route id="sftp_poller">
> <from
> uri="sftp://test@192.168.1.10/var/test/in?password=test&amp;binary=true&amp;consumer.delay=1000"/>
> <to uri="file://c:/2"/>
> </route>
> 
> When I try to use it I got such error:
> 
> [sftp://test@192.168.1.10/var/test/in]: reject HostKey: 192.168.1.10
> com.jcraft.jsch.JSchException: reject HostKey: 192.168.1.10
>         at com.jcraft.jsch.Session.checkHost(Session.java:700)
>         at com.jcraft.jsch.Session.connect(Session.java:307)
>         at com.jcraft.jsch.Session.connect(Session.java:150)
>         at
> org.apache.camel.component.file.remote.SftpConsumer.connectIfNecessary(SftpConsumer.java:73)
>         at
> org.apache.camel.component.file.remote.SftpConsumer.poll(SftpConsumer.java:96)
>         at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> 
> How can I fix this?
> 

-- 
View this message in context: http://www.nabble.com/SFTP.-HostKey-verification-error-tp21682724s22882p21725200.html
Sent from the Camel - Users mailing list archive at Nabble.com.