Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tSCP - using a private/publick key to connect to a Linux server

This relates to another discussion, but the solution doesnt work for me .
https://community.talend.com/t5/Design-and-Development/Password-less-SCP/td-p/61103
I am using Talend 5.3 :
I have a job for which I need to scp a file from a Windows to a Backbox (Ubuntu) server.
Have automatic ( using Public/Private keys ) set up, which runs without problems from the Windows CMD prompt :
C:\>psftp -l ajonlinux -2 -i id_dsa_arnoldjeffrey_vm.ppk 10.1.67.21
Using username "ajonlinux".
Remote working directory is /home/ajonlinux
psftp>
On the Lunix server, I have the id_dsa_arnoldjeffrey_vm.pub key imported into the ajonlinux:/home/ajonlinux/authorized_keys
I will add a screen capture to this issue in a later step
When i run the procedure from Talend, I get the following error message :
Starting job Upload_ftptcpip_abcfile1_toFNB at 15:15 10/06/2013.
connecting to socket on port 3776
connected
Exception in component tSCPConnection_1
java.io.IOException: Publickey authentication failed.
at ch.ethz.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:263)
at ch.ethz.ssh2.Connection.authenticateWithPublicKey(Connection.java:430)
at ch.ethz.ssh2.Connection.authenticateWithPublicKey(Connection.java:481)
at danone.upload_ftptcpip_abcfile1_tofnb_0_1.Upload_ftptcpip_abcfile1_toFNB.tSCPConnection_1Process(Upload_ftptcpip_abcfile1_toFNB.java:503)
at danone.upload_ftptcpip_abcfile1_tofnb_0_1.Upload_ftptcpip_abcfile1_toFNB.tFileExist_1Process(Upload_ftptcpip_abcfile1_toFNB.java:439)
at danone.upload_ftptcpip_abcfile1_tofnb_0_1.Upload_ftptcpip_abcfile1_toFNB.runJobInTOS(Upload_ftptcpip_abcfile1_toFNB.java:3044)
at danone.upload_ftptcpip_abcfile1_tofnb_0_1.Upload_ftptcpip_abcfile1_toFNB.main(Upload_ftptcpip_abcfile1_toFNB.java:2905)
Caused by: java.io.IOException: Invalid PEM structure, '-----BEGIN...' missing
at ch.ethz.ssh2.crypto.PEMDecoder.parsePEM(PEMDecoder.java:138)
at ch.ethz.ssh2.crypto.PEMDecoder.decode(PEMDecoder.java:313)
at ch.ethz.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:172)
... 6 more
disconnected
Job Upload_ftptcpip_abcfile1_toFNB ended at 15:15 10/06/2013.
Labels (3)
2 Replies
Anonymous
Not applicable
Author

Problem solved :
you need to use Puttygen : load the "Putty" generated .ppk file into Puttygen and select "Conversion" from the menu and save the file in OPENSSH format.
mertez
Contributor III
Contributor III

It seems that the tSCPConnection component support just the old openssl format whereas the default option with ssh-keygen is openssh. If you are facing a similar  issue check your private key which should start with -----BEGIN RSA PRIVATE KEY----- (in case you are using rsa). If your private key file starts with -----BEGIN OPENSSH PRIVATE KEY----- you will most probably not be able to authenticate. You can generate a PEM format like described on the following site:

https://logmx.com/docs/public-key.html

 

Talend version: 7.3, macos