How to send a password from a batch-file to a newly opened ssh session from that same file?
When I try this:
@echo off
cd "C:\Program Files\OpenSSH\"
start ssh.exe user@1.2.3.4
echo passwd
pause
It opens a new cmd.exe window for ssh session but enters the passwd in the old cmd window.