I'm trying to make a batch script to log in into a SSH server and execute a few commands. The start command is:
plink -ssh [email protected]
Then I need to enter the User Name and Password like the image:

If I have the 'User Name' and 'Password' in two variables, how do I use them when it asks me for?
[EDIT]
last try was this:
(echo username
echo mypassword) | plink -ssh [email protected]
Output:
User Name:username
mypassword
Password:
The batch didn't "pressed" enter after inputing the username.