Well, I was immediately able to figure out the alternate approach for it.

Map<String, String> map = exchange.getIn().getBody(HashMap.class);
                                        
exchange.getIn().setHeader("USERNAME", map.get(HeaderConstant.USER_NAME));
exchange.getIn().setHeader("PASSWORD", map.get(HeaderConstant.PASSCODE));

getContext().createProducerTemplate().requestBody("ssh://localhost?username="+map.get(HeaderConstant.USER_NAME)+"&password="+map.get(HeaderConstant.PASSCODE)+"&pollCommand=features:hostname%0A",
map);

I have another question though, with user id and password it works fine. How
to make it work against a randomly generated RSA token?

Most of the example i see are with ssh keys but i dont have this scenario
applicable. Any pointers?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-SSH-dynamic-values-tp5797435p5797436.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to