0

How to send a password from a to a newly opened 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.

Compo
  • 34,184
  • 4
  • 22
  • 36
user3013157
  • 109
  • 1
  • 9

0 Answers0