Apache 驼峰ssh是否使用.ssh/config?

Apache 驼峰ssh是否使用.ssh/config?,apache,ssh,apache-camel,Apache,Ssh,Apache Camel,驼峰ssh是否使用$HOME/.ssh/config文件中指定的配置 如果没有,像“StrictHostKeyChecking”这样的选项是否可以以某种方式在驼峰ssh中传递 我被困在调试另一个问题上,还不能运行camelsh。想知道是否有其他人成功地使用了它 我计划在karaf中实现一个OSGI捆绑包,它使用camel ssh以ssh方式连接到远程服务器并在其上执行命令 更新: 我试过了,但它似乎没有使用.ssh/config文件 我的ssh URI: ssh:host:22?username

驼峰ssh是否使用$HOME/.ssh/config文件中指定的配置

如果没有,像“StrictHostKeyChecking”这样的选项是否可以以某种方式在驼峰ssh中传递

我被困在调试另一个问题上,还不能运行camelsh。想知道是否有其他人成功地使用了它

我计划在karaf中实现一个OSGI捆绑包,它使用camel ssh以ssh方式连接到远程服务器并在其上执行命令

更新: 我试过了,但它似乎没有使用.ssh/config文件

我的ssh URI:

ssh:host:22?username=xx&certResource=file:/Users/xxx/.ssh/id_rsa&timeout=300000
.ssh/config文件中有一个“主机”条目

例外是

Exchange[ExchangePattern: InOnly, BodyType: String, Body: uname -a 2>&1 , CaughtExceptionType: org.apache.camel.CamelExchangeException, CaughtExceptionMessage: Cannot execute command: uname -a 2>&1 . Exchange[Message: uname -a 2>&1 ]. Caused by: [java.nio.channels.UnresolvedAddressException - null], StackTrace: org.apache.camel.CamelExchangeException: Cannot execute command: uname -a 2>&1 . Exchange[Message: uname -a 2>&1 ]. Caused by: [java.nio.channels.UnresolvedAddressException - null]
    at org.apache.camel.component.ssh.SshProducer.process(SshProducer.java:43)
    at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
    at org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:590)
    at org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:518)
    at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:227)
    at org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:167)
    at org.apache.camel.processor.RecipientList.process(RecipientList.java:120)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
    at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)
    at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)
    at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.channels.UnresolvedAddressException
    at sun.nio.ch.Net.checkAddress(Net.java:123)
    at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implConnect(UnixAsynchronousSocketChannelImpl.java:301)
    at sun.nio.ch.AsynchronousSocketChannelImpl.connect(AsynchronousSocketChannelImpl.java:209)
    at org.apache.sshd.common.io.nio2.Nio2Connector.connect(Nio2Connector.java:46)
    at org.apache.sshd.SshClient.connect(SshClient.java:297)
    at org.apache.sshd.SshClient.connect(SshClient.java:283)
    at org.apache.camel.component.ssh.SshEndpoint.sendExecCommand(SshEndpoint.java:88)
    at org.apache.camel.component.ssh.SshProducer.process(SshProducer.java:38)

看起来您正在尝试连接到空字符串
UnsolvedAddressException-null
我看到“Nio2Connector | 239-org.apache.sshd.core-0.13.0 |连接到主机:22”我希望它通过查找$HOME/.ssh/config文件将“主机”转换为实际主机名。看起来您正在尝试连接到空字符串
UnsolvedAddressException-null
我看到“Nio2Connector | 239-org.apache.sshd.core-0.13.0 |连接到主机:22”我希望它通过查找$HOME/.ssh/config文件将“主机”转换为实际主机名。