Using camel 2.22.3, I have a camel route that at one point executes the
following:

            <camel:to uri="ssh://user@host
?knownHostsResource=known_hosts&amp;password=pwd"/>

It errors with:

2020-02-25 21:07:46.125  WARN 8292 --- [MAIN] []-nio2-thread-4]
o.a.s.client.session.ClientSessionImpl   :
exceptionCaught(ClientSessionImpl[user@host/xx.xx.xx.xx:22])[state=Opened]
UnsupportedOperationException: null
2020-02-25 21:07:46.126  INFO 8292 --- [roducerTemplate]
o.a.sshd.common.io.nio2.Nio2Session      :
doCloseGracefully(Nio2Session[local=/xx.xx.xx.xx:65120,
remote=host/xx.xx.xx.xx:22]) ClosedChannelException while shutting down
output: null
Exhausted after delivery attempt: 1 caught:
org.apache.camel.CamelExchangeException: Cannot execute command: date.
Caused by: [org.apache.camel.RuntimeCamelException - Failed to authenticate
username user]

While the above values are obviously redacted, the known_hosts file has the
correct entry, and the host, username and password are all correct.  I have
tried various combinations of other parameters, but all fail to
authenticate.  (If the knownHostsResource is missing, I do see the
expected other exception.)

I have been unable to chase down the exact cause in the debugger.  Is there
a configuration or other option I may be missing for username/password
authentication?

Thank you,
Greg

Reply via email to