1,105,286 Community Members

VBscript send keys to Cygwin fails at ssh password

Member Avatar
Newbie Poster
1 post since Sep 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 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
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

It's taking till password step fails very next.

I had double confirmed the password.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: