I would like to know how to automate an input of username and password in putty after the initial login was successful.
I have a bat file connect.bat
@echo off
putty [user]@[host] -pw [password]
After I run this, it opens a new putty window and validates the login.
When successful, I am redirected not to the shell but to another login screen. Sample below.
Then I need to manually input a different username and password by typing the following.
[username]
[ENTER KEY]
[password]
[ENTER KEY]
To be finally redirected to the host's menu.
I tried the following:
echo [username] & [password] | putty [user]@[host] -pw [password]
putty [user]@[host] -pw [password] < user_pass.txt
putty [user]@[host] -pw [password] -m user_pass.txt
but failed, is there a way to perform this via batch/powershell script or should I incorporate another application?