1.11M Members

VBscript send keys to Cygwin fails at ssh password

 
0
 

I had written a script to login to some terminals and do some basic commands remotely.

It fails at password entry.
*******************************************************************

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cygwin"

' Give Cygwin time to load
WScript.Sleep 2000
a=Array(112)
For Each i In a
WshShell.SendKeys "`ssh user@XX.XX.XX.XX" & i & " 'hostname;ps aux' " & "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "******" & "{ENTER}"
WScript.Sleep 2000

Next
***************************************************************
It's taking till password step fails very next.

I had double confirmed the password.

You
Post:
Start New Discussion
View similar articles that have also been tagged: