By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

Running plink with user input interaction from vb.net

P: 7
Hi there,

I am trying to run a .sh file with plink from vb.net.

I am now able to run the .sh on vb.net throught plink but i have a problem because the .sh script require user input:
The .sh is prompting a few question and require user to input y/n to proceed.

I am trying plink.standardinput.writeline("y") but it looks like this input is not feed to the .sh script but rather to the plink session after the .sh script ended.

Any idea about this or is there any other way for this?

Thanks
May 11 '13 #1
Share this Question
Share on Google+
3 Replies


P: 7
No one have any idea bout this? I think I am totally no idea how to insert the user input to the linux .sh.
May 25 '13 #2

Oralloy
Expert 100+
P: 983
sheauyun,

Try creating an input file for your shell script, then execute the shell-script using input redirecton to read the file.

Unfortunately I don't have VB at the moment, but something like this:
Expand|Select|Wrap|Line Numbers
  1. /...path.../plink < /...path.../in-file
Hopefully that helps,
Oralloy
May 26 '13 #3

P: 7
@Oralloy
Oralloy,

Thank you for your recommendation but I actually need to execute the shell-script first. Then depend on user to key-in y or n after they confirm the result.

Any other idea to do this?

Thanks
Jun 9 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.