- 论坛徽章:
- 0
|
自行参考修改
点script--〉run。 调用下面这个vbs。。。。。。。
- '* date =2009-10-30
- ' § define §
- dim Tab0,Tab1
- dim usernameA,passwordA,usernameB,passwordB
- ' § init §
- usernameA=xxx
- passwordA=yyy
- usernameB=aaa
- passwordB=bbb
- ' § start §
- ' §login to SolarisA and shutdown §
- Set Tab0= crt.Session.ConnectInTab ("/ssh " &SolarisA& " 22")
- Tab0.Screen.WaitForString "ogin: "
- Tab0.Screen.send usernameA& chr(13)
- Tab0.Screen.WaitForString "sword: "
- Tab0.Screen.send passwordA& chr(13)
- Tab0.Screen.WaitForString "# "
- Tab0.Screen.send "sync; init 5"& chr(13)
- ' §login to SolarisB and shutdown §
- Set Tab1= crt.Session.ConnectInTab ("/ssh " &SolarisB& " 22")
- Tab1.Screen.WaitForString "ogin: "
- Tab1.Screen.send usernameB& chr(13)
- Tab1.Screen.WaitForString "sword: "
- Tab1.Screen.send passwordB& chr(13)
- Tab0.Screen.WaitForString "# "
- Tab0.Screen.send "sync; init 0"& chr(13)
复制代码 |
|