누구나 Camel SSH 구성 요소로 keyPairProvider 옵션을 지정하는 방법을 제안 할 수 있습니까?Camel SSH keyPairProvider 옵션
Camel SSH 구성 요소 및 KeyPairProvider 옵션을 사용하여 원격 SSH 서버에 연결하려고합니다. 문서는이 옵션을 사용하는 방법, 구문 또는 우리가 제공해야하는 값 등에 대해서는 명확하지 않습니다. classname, 전체 클래스 경로, 키 파일 이름 등을 제공하려고 시도했습니다. 아무 것도 작동하지 않습니다. 나는 항상 아래의 오류가 발생합니다. 내가 keyPairProvider을주고 암호를 사용하도록 경로를 변경하지 않으면
Caused by: java.lang.IllegalArgumentException: Could not find a suitable setter for property: keyPairProvider as there isn't a setter method with same type: java.lang.String nor type conversion possible: No type converter available to convert from type: java.lang.String to the required type: org.apache.sshd.common.KeyPairProvider with value file:com.example.tree.custom.CustomFileKeyPairProvider
at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:555)
at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:565)
at org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:453)
at org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:249)
at org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:264)
at org.apache.camel.component.ssh.SshComponent.createEndpoint(SshComponent.java:47)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:120)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:508)
... 18 more
이
은 잘 작동, 내 경로from("direct:sshroute")
.to("ssh://[email protected]?keyPairProvider=com.example.tree.custom.CustomFileKeyPairProvider")
입니다.
또한 내 자신의 SSHComponent를 만들고 CustomFileKeyPairProvider를 설정하고 CamelContext (테스트 패키지에 주어진대로)에 추가한다고 언급하고 싶습니다. 그러나 기본 Camel Component를 사용하는지 알고 싶다면이 옵션을 어떻게 사용하면됩니까?
감사 - 나는 또한 낙타 SFTP 경로를 통해 파일을 제공 할 수 있어야하기 때문에 라비
이것에 대한 정보를 찾을 수 있었습니까? – Carlos
불행히도 없습니다. – Ravi
암호를 입력하지 않고 SSH 공개 키를 사용하여 원격 SSH에 로그온하려고합니까? 내가 그 일을 적극적으로하고 있기 때문에 이중 확인하고 싶다. – Carlos