See this FAQ
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

On Tue, Apr 11, 2017 at 11:33 PM, urwithsumit <[email protected]> wrote:
> I am trying to use Camel ssh component as a producer. I am passing username
> and password as a dynamic parameter. With camel Version 2.18.2, my uri looks
> like below:
>
> .to("ssh://localhost?username=${header.USERNAME}&password=${header.PASSWORD}&pollCommand=features:hostname%0A")
>
> With this uri, I keep getting error: Caused by:
> org.apache.camel.RuntimeCamelException: Failed to authenticate username
> ${header.USERNAME}
>
> The above uri works if i hard code the username and password value.
> This makes me wonder if supplying the values for username & password
> dynamically is supported by this component or not?.
>
> If not, than what alternative approach i can take to achieve the same
> objective.
>
> Regards
> Sumit
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-SSH-dynamic-values-tp5797435.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to