Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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' ?
Labels (2)
3 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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?
Anonymous
Not applicable
Author

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