
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Files transfer to sftp without password using SSH private key
I am currently using tftp and tftpput to file transfer to a sftp location using userid and password. I was asked to change this to passwordless file transfer, and provided with private and public key to be used for this implementation. Could you please advise how to achieve this request?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You could try to generate the SSH key from the server where your FTP is hosted. On tFTPXXX component, check the box 'SFTP Support', select 'Publich key' in the Authentication method list and browse your private key in Private key field.
Feel free to let us know if it works.
Best regards
Sabrina

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank for your response. I tried the same and this is the error:
Exception in component tFTPConnection_1 (testing_ftp)
com.jcraft.jsch.JSchException: invalid privatekey: [B@71be98f5....
Could you please let me know what this means and how to correct?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The keys i using were provided by the other party for the sftp server which i will be connecting to. I didn't generate one from the Talend server and I used them as you recommended here and getting this error:
Exception in component tFTPConnection_1 (testing_ftp)
com.jcraft.jsch.JSchException: invalid privatekey: [B@71be98f5

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Are you able to connect to that server (password and SSH private key) with WinScp tool using same details or does this issue only repro when connecting via talend job?
The invalid private key 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.
Hope it helps.
Best regards
Sabrina
