• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to handle user interaction with shell script running on remote UX system using JSch  RSS feed

 
Kjeld Sigtermans
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to run a .sh script on a remote UX system by using JSch API. The code looks somewhat like this:

It seems to run the script, but I know the script requires me to enter 'q' and then 'y' and then enter. How do I provide these keystrokes to the script?
I tried appending them to the command:

But that did not work. In both cases it stalls and I have to stop the execution of my code.
Any ideas how to solve this?

Cheers,
Kjeld
 
Kjeld Sigtermans
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind. I resolved it by removing the interaction sequence from the script.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!