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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

SFTP with private key

Hi,
I have a private key pait with my server generated by PuTTYGen which work well with WinSCP.
The key was generated using SSH-2 RSA and it's called P_Key.ppk
I am trying to set that up with TOS 3.2, however it does not seem to like the key: the error is the following:
Exception in component tFTPPut_1
com.jcraft.jsch.JSchException: invalid privatekey: E:/Download/P_key.ppk
at com.jcraft.jsch.IdentityFile.<init>(IdentityFile.java:210)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:135)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:130)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:200)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:194)
at tos_ivigate.test_sftp_0_1.TEST_SFTP.tFTPPut_1Process(TEST_SFTP.java:208)
at tos_ivigate.test_sftp_0_1.TEST_SFTP.runJobInTOS(TEST_SFTP.java:471)
at tos_ivigate.test_sftp_0_1.TEST_SFTP.main(TEST_SFTP.java:383)
Thanks for your help
Regards
Yann
Labels (3)
1 Solution

Accepted Solutions
_AnonymousUser
Specialist III
Specialist III

I've been trying to use ssh from within ant, and got that exception. http://www.bob-team.de/wordpress/2010/01/02/ant-und-ssh helped.. Load the .ppk into PuttyGen, use the Conversions menu (not one of the dialog buttons) to export it in OpenSSH format (I saved it as id_rsa_openssh.ppk) and use that key instead. Works for me.

View solution in original post

13 Replies
Anonymous
Not applicable
Author

Hello Yann
I got the same problem, please report a bug on bugtracker.
Best regards

shong
_AnonymousUser
Specialist III
Specialist III

Hi,
Even I am getting the error com.jcraft.jsch.JSchException: invalid privatekey.
Did anyone find solution for the private key format of .ppk extension
Thanks.
Regards,
Sandeep
_AnonymousUser
Specialist III
Specialist III

I've been trying to use ssh from within ant, and got that exception. http://www.bob-team.de/wordpress/2010/01/02/ant-und-ssh helped.. Load the .ppk into PuttyGen, use the Conversions menu (not one of the dialog buttons) to export it in OpenSSH format (I saved it as id_rsa_openssh.ppk) and use that key instead. Works for me.
_AnonymousUser
Specialist III
Specialist III

Hi,
Try using a "*.key" file generated for your .ppk file instead.
It works I guess. Just worth the try.
Anonymous
Not applicable
Author

It's the way how putty generate key files. As mentioned above you schould use conversion functions of puttygen and export file as OpenSSHKey and then it schould work.
On the other hand when you generate keys directly on you unix like system using OpenSSH utility ssh-keygen, you avoid these issues. ...I think
Best regards,
archenroot
Anonymous
Not applicable
Author

Hi All,
I am getting the below exception while creating the Job by using tFTPconnection component .
Can some one please help on this?
Exception in component tFTPConnection_1
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.enterprisedt.util.proxy.PlainSocket.createPlainSocket(PlainSocket.java:102)
at com.enterprisedt.net.ftp.FTPControlSocket.<init>(FTPControlSocket.java:355)
at com.enterprisedt.net.ftp.FTPClient.connect(FTPClient.java:958)
at testproject.test_job_0_1.Test_Job.tFTPConnection_1Process(Test_Job.java:298)
at testproject.test_job_0_1.Test_Job.runJobInTOS(Test_Job.java:517)
at testproject.test_job_0_1.Test_Job.main(Test_Job.java:385)
Thanks.
janhess
Creator II
Creator II

You don't have permissions to connect to the destination.
Anonymous
Not applicable
Author

Hi, 
While sending a file via tFTPPut I am getting the permission denied error as below.. I have given all the permissions to the required destination folder which is located in the one of the dev servers.
What do I need to do in order to use the tFTPPut functionality? Any help is appreciated.
Exception in component tFTPPut_1
3: Permission denied, file: /Test_Dir/Test_file.txt
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2297)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1750)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1767)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1724)
at talend_project.testjob4_0_1.TestJob4.tFTPPut_1Process(TestJob4.java:474)
at talend_project.testjob4_0_1.TestJob4.runJobInTOS(TestJob4.java:752)
at talend_project.testjob4_0_1.TestJob4.main(TestJob4.java:620)
Anonymous
Not applicable
Author

Whether the respective user also has the permissions? have you tried with the same configuration using a client?
Vaibhav