导入pom文件
<!-- 远程shell命令执行 -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ssh</artifactId>
<version>${camel.version}</version>
<!-- use the same version as your Camel core version -->
</dependency>
如何使用
<route id="jettyRoute">
<from uri="jetty:http://{{ip}}:{{port}}/ssh"/>
<removeHeaders pattern="CamelHttpUri"/>
<to uri="ssh://user:pwd@192.168.80.12:22"/>
</route>
通过ssh进行远程执行shell命令,需要传入用户名、密码、ip、ssh连接端口