01-07-2022 03:08 AM - edited 01-07-2022 06:42 AM
I have the current script written to get me into the router.
"plink.exe" -ssh username@host -pw password < "input.txt"
The problem is once I am in the router I need it to enable and then enter another password in before I can execute commands. When I run this script it gets to the enable part but does not enter in the password. From what I am understanding in my "input.txt" I have the command "enable" which it executes, but if I put anything after that it runs it as a new command. After I enter in the "enable" command I need it to enter a password before executing more commands and I can't just put it right underneath "enable" in the "input.txt."
Is there a way to fix this?
Here is the input.txt I have set up
enable password config t (I would like to enter different commands here once in configuration mode)
Thank you for your help.
01-07-2022 06:40 AM
is the user in privelage 15 if not use that priv 15 and test it.
01-07-2022 06:45 AM
I am in privelage 15. Also, after testing multiple things I have updated my question to better reflect my issue.
Thank you for trying to help.
01-07-2022 09:31 AM - edited 01-07-2022 09:32 AM
input commands to send after login, so the enable should be done before it process inputs.
If you use privalage level 15 user, the enable password not required, based on your VTY config.
like below :
line vty 0 4
no login
privilege level 15
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide