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

One Star

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

This relates to another discussion, but the solution doesnt work for me .
http://www.talendforge.org/forum/viewtopic.php?id=23635
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.
One Star

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

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.