Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Croix
Creator
Creator

[resolved] tFTPComponent Invalid Private Key Error

Hi,
Our team is using the Talend Big Data Platform 6.2 on Windows 7. When I use the tFTPComponent I get an error that says "tFTPConnection_1 invalid privatekey: [B@80503" when it tries to connect to the remote server. It shows the sFTP options because I clicked the SFTP Support check box.
We do have a id_rsa key in a local drive that it is using.
My question is: is there some kind of speical key format that the Talend tFTPConnection? Does it need to be in any special encoding?
The funny thing is that this key works fine when we use sFTP directly to connect, just not when we try to connect using Talend.
More info
Exception in component tFTPConnection_1
com.jcraft.jsch.JSchException: invalid privatekey: [B@80503
at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:407)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:388)
Thanks!
Croix
Labels (4)
1 Solution

Accepted Solutions
Croix
Creator
Creator
Author

It turns out that we were able to get the sftp to work after generating the key with this command 
ssh-keygen -t rsa
Previously we used a -o switch but that seemed to cause the "invalid private key" in Talend.

View solution in original post

7 Replies
Anonymous
Not applicable

Hi,
Did you use  putty keys? If so,  need to be converted to open ssh keys.
Could you please take a look at this related forum:https://community.talend.com/t5/Design-and-Development/SFTP-with-private-key/td-p/109392 to see if it works?
Best regards
Sabrina
Croix
Creator
Creator
Author

It turns out that we were able to get the sftp to work after generating the key with this command 
ssh-keygen -t rsa
Previously we used a -o switch but that seemed to cause the "invalid private key" in Talend.
Anonymous
Not applicable

Hi,
Thanks for your feedback and sharing your solution with us.
Best regards
Sabrina
DBLONDEL1643728674
Contributor III
Contributor III

Hi, I was reading the different last posts concerning the reject "invalid privatekey".

using the key pair that has been generated by my collegues I can connect to this sftp using filezilla ... but I can't with Talend. Does it mean that the way the key pair has been generated may influence the result in Talend only ?

regards

Damien

Anonymous
Not applicable

Hello,

The invalid privatekey error points to a private key (.ssh/id_rsa) format that JGit does not work with, on the Studio machine. Talend Studio relies on the JSch library for SSH. This library supports only some private key formats, such as keys in OpenSSL (traditional SSLeay) and PKCS#8 formats. For more information, see JSch - Java Secure Channel.

However, it is possible to convert the private key format into a format supported by JSch using PuTTYgen. For more information, see Change Private Key Format to Use with PuTTY.

Best regards

Sabrina

DBLONDEL1643728674
Contributor III
Contributor III

Bonjour,

I did the conversion using PuTTyGEN to OpenSSH but still have rejects in studio 7.3

 

as a recap

1.I have generated a pair of public/private RSA SSH2 keys.

2.The public key has been sent to the provider of the sftp service. I am using the private one.

3.Connexion works from filezilla

4.In talend I have a Auth failure.

 

I followed your instruction.

In puttyGen, I converted my private key :

1.Conversions / Export OpenSSH key. coming back in talend studio I have Auth failure

2.Conversions / Export Open SSH Key (force new file format). Coming back in talend studio I have 'invalid privatekey"

 

both of these converted keys are accepted in filezila

 

srota25
Contributor
Contributor

I am facing similar issue now. Any solution you received for this?