Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
DBS1
Contributor III
Contributor III

Establish DB connection over SSH

Hi

How to establish DB connection over SSH in Talend.

 

Thanks

DBS

Labels (3)
2 Replies
Xiaodi_Shi
Support
Support

 

Hello,

Let us know if you have ssh tunnel info: proxy host, proxy user & private key file as you have to establish a ssh connection to the proxy server with a given user and the key file (you need also a passphrase for the key file).

In the configuration of the ssh connection you have to add a tunnel. All this must be established before you start the job. The host for DB server in this scenario is localhost!

You could also use putty to forward port through ssh connection.

Here is a good Nick search on google for "SSH portforward" or SSH tunnel

https://tecadmin.net/putty-ssh-tunnel-and-port-forwarding/

Related reference:

https://www.howtogeek.com/168145/how-to-use-ssh-tunneling/

Best regards

Sabrina

DBS1
Contributor III
Contributor III
Author

Hi @Xiaodi_Shi 

Thanks for the reply.

I am able to establish DB connection once I run the below ssh command in Command prompt and then run my talend job which contains just the tDBConnection component. In tDBConnection for host, I am providing "localhost" and for port I am providing the value of "local_port".

ssh -i keyfile_path -L local_port: database_server_host:database_server_port ssh_user_name@ssh_host

So as to automate the process, I have added the above command in tSystem and onSubJobOk to tDBConnection. But, I am getting communication link failure. 

Could you please help why this issue is coming?

Thanks