how to create ssh tunnel by the component of tSSH

One Star

how to create ssh tunnel by the component of tSSH

I would like to create ssh tunnel by a command such as:
ssh -l root -p 1035 -L 11016:127.0.0.1:5432 -N -g -f X.X.X.X
but after that I will get prompted to input pwd or 'YES/NO' confirmaton, how to wait for output back and based on the output content, type subsequent command, pwd or 'Yes' ?
One Star

Re: how to create ssh tunnel by the component of tSSH

Hi
Welcome to Talend Community!
Why don't you use tSSH component? Then you will get return values ((String)globalMap.get("tSSH_1_STDOUT")).
Regards,
Pedro
One Star

Re: how to create ssh tunnel by the component of tSSH

Hi
Thanks for your quick reply.
I had been using that. Let me clarify it.
I firstly logon on the Host A by the tSSH component, then executed the command 'ssh -l root -p 1035 -L 11016:127.0.0.1:5432 -N -g -f X.X.X.X' to create ssh port tunnel, after that, it was expected that I would get prompted to type pwd or others, anyway, I need know when it gets returned and what content.
make such question generic:
how to execute interactive commands in tSSH component?
One Star

Re: how to create ssh tunnel by the component of tSSH

Hi
As far as I'm concerned, it's impossible to execute interactive command with tSSH component.
It is not a terminal.
Regards,
Pedro

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now