I am new to using batch so I'm not sure if what I'm trying to do is possible, BUT, the scenario is I have several switches that I need to manage using SSH. I am currently using plink(putty) to do so through the command prompt. I'm able to coect to my switches but I'm confused on how to automate the login portion.
What I'm trying to figure out is when I coect to the switch I am stopped 3 times and asked for input, one time for useame, again for useame(i dont know why its twice) and then finally for password. All of that before I can actually run commands on the switch.
So in my very archaic batch file I'm attempting to do the following.
echo
plink SESSIONNAME -l useame -pw password
enable
config
crypto key generate rsa
the switch however doesn't want to cooperate with plink in accepting the input useame and pw, instead prompting me to input that same information into cmdprompt. Is there a way in batch to have it "wait" for the switch to prompt me for the useame and then input it, then "wait" for the switch to prompt me for the password and input that as well? All before executing my desired commands?
Every search I've done has only given me the results for the other way around, where the batch file would prompt the user for input, rather than whatever im coecting to prompting me for input.
