IMPORTANT: that this is not just for this case, I want to create for example .bats to automate some things, then I would like to know how to make him wait for the command to return and interpret my next line as the answer.
How i can do .bat file answer one question comes of a command, for example:
I run it:
ssh -p port user@host
And then it require password, how in the next line i do it answer programatycally in same .bat?
I tryied:
ssh -p port user@host
PASSWORD
But dont works, he discart my PASSWORD and require it in the next line.