One Star

Using SFTP with tFTPConnection

Hi,
I am trying to connect to a SFTP site using the "Public key" authentication method.
I receive the following error..
Exception in component tFTPConnection_1
com.jcraft.jsch.JSchException: Auth cancel
at com.jcraft.jsch.Session.connect(Session.java:511)
at com.jcraft.jsch.Session.connect(Session.java:183)
at employsure.sftp_0_1.sftp.tFTPConnection_1Process(sftp.java:408)
at employsure.sftp_0_1.sftp.runJobInTOS(sftp.java:814)
at employsure.sftp_0_1.sftp.main(sftp.java:666)
I can successfully connect to this site using the WINSCP tool using the same credentials.
I notice using the WINSCP tool, if I don't set the password property it prompts me for it.

Looking at the generated code for both authentication types (Public Key & Password), it seems Talend does not set the password when using Public Key authentication.

Can you confirm if this is by design? And, if there is way to use both?
9 REPLIES
Moderator

Re: Using SFTP with tFTPConnection

Hi,
Is your private key valid? What's the build version you are using?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Using SFTP with tFTPConnection

Yes, private key is valid - I'm using the same file with WINSCP (and other FTP clients).
Using 6.3.0.20161026
One Star

Re: Using SFTP with tFTPConnection

I managed to apply a hack/patch to make this work..
I edited the "plugins\org.talend.designer.components.localprovider_6.3.0.20161026_1219\components\tFTPConnection\tFTPConnection_begin.javajet" file and forced the template to generate both the "public key" code option and the "password" option, not either or.
And it worked.
Can we please wire this option into future versions?
Moderator

Re: Using SFTP with tFTPConnection

Hi,
Could you please create a jira issue on talend bug tracker for this issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Using SFTP with tFTPConnection

Hi David,
Can you please specify where and what exactly you have edited in the tFTPConnection_begin.javajet file ?
Moderator

Re: Using SFTP with tFTPConnection

Hi,
It should be located in <TalendStudioInstallationPath\plugins\org.talend.designer.components.localprovider_6.x.x.xxx.xx\components\tFTPConnection folder.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Using SFTP with tFTPConnection

Yes I got the path to the file but what exactly needs to be changed in that file ?
Moderator

Re: Using SFTP with tFTPConnection

Hi,
We have no idea about the change. Did you get the same situation with davidoxley?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Using SFTP with tFTPConnection

Hi,
I am getting the same error as davidoxley got but the difference is I am using Talend 5.6 and port used is 12922.
Still I can try the change that he did in the tFTPConnection_begin.javajet file provided I come to know what is the exact change that I need to do.

Sabrina, Can you also tell me that tFTPConnection component only supports port 22 ?