0

I need to login to an SSH session using password, and then execute the user input values for a particular account.

For example:

PLINK.EXE -ssh ***** -l ***** -pw *****

I am able to login, now what I need to do is enter below values:

  • Please select account to logon: "U"
  • Press RETURN to continue or OFF to cancel session - "RETURN"

There are similarly this kind of user inputs needed. Is there a way I store the "*" values in a text file and load them using Plink.

I tried:

PLINK.EXE -ssh ***** -l ***** -pw ***** -m C:\input.txt

This does not seems to be working.

Expectation: Passing all the user input i.e. "U", "RETURN" .... using Plink or any other PuTTY tool.

Appreciate your help!

1 Answer 1

1

The -m switch is used to execute commands in shell. You cannot use it to provide inputs for the executed commands.

But as Plink is a console application, you can use an input redirection to provide input:

plink.exe -ssh ... -l ... -pw ... < C:\input.txt
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.