Patricia created CAMEL-21724:
--------------------------------
Summary: Unable to connect to SFTP server using the "privateKey"
parameter
Key: CAMEL-21724
URL: https://issues.apache.org/jira/browse/CAMEL-21724
Project: Camel
Issue Type: Bug
Components: camel-core, camel-ftp
Affects Versions: 4.9.0
Environment: * Apache Camel version: 4.9.0
* Java version: 21.0.5
* Operating System: Windows 10
Reporter: Patricia
I am experiencing an issue when trying to connect to my SFTP server using a
private key string. When I specify the absolute path to my private key file in
the "privateKeyFile" parameter, the connection works correctly. However, if I
attempt to use a string containing my private key in the "privateKey"
parameter, I am unable to establish a connection.
*Attempts to Resolve:*
* Sent the raw bytes of the private key string in the "privateKey" parameter.
* Removed line breaks from the private key string.
* Encoded the private key string in UTF-8.
* Decoded the private key string using Base64.
* Removed the "BEGIN RSA..." and "END RSA..." lines from the private key
string.
None of these methods have worked.
*Additional Information:*
* I have not found documentation specifying the exact format required for the
"privateKey" parameter (it only mentions byte[], but I already tried with the
bytes of the string that contains my key and didn't work).
* There are no examples available of successful connections using the
"privateKey" parameter. All examples I found use "privateKeyFile", which works
for me as well, but using "privateKey" would be more convenient for our use
case.
Is there a certain way this private key has to be formatted for this
"privateKey" parameter to work?
Thanks beforehand
--
This message was sent by Atlassian Jira
(v8.20.10#820010)