- plink_path = "C:/plink.exe"
- username = "username"
- password = "password"
- host = "192.168.0.1"
-
- command = "ls"
-
- Set oShell = CreateObject("WSCript.shell")
- commandLine = plink_path & " -ssh " & username & "@" & host & " -pw " & password & " " & command
- Set exeRs = oShell.Exec(commandLine)
-
- errMsg = exeRs.StdErr.ReadAll()
- stdMsg = exeRs.StdOut.ReadAll()
-
- msgbox stdMsg
Execute Unix Command via Putty_QTP,布布扣,bubuko.com
Execute Unix Command via Putty_QTP
原文:http://www.cnblogs.com/ellie-test/p/3807414.html