my script :
# $language = "VBScript"
# $interface = "1.0"
' Connect to an SSH server using the SSH2 protocol. Specify the
' username and password and hostname on the command line as well as
' some SSH2 protocol specific options.
host = "djme"
user = "linux"
' Prompt for a password instead of embedding it in a script...
passwd = "ciscohuawei0"
cmd = "/SSH2 /L " & user & " /PASSWORD " & passwd & " /C 3DES /M MD5 " & host
huawei = crt.Screen.WaitForStrings("ME60","connection","out","unreachable",10)
Select case huawei
crt.screen.send "dis ip-pool pool-usage domain pppoe" & VbCr
crt.screen.send "q" & VbCr
I Just Want to auto exit secure crt if there is no ME60 character on the screen.
But it can't.
Anyone could kind enough to tell me.
If you are trying to handle issues regarding connection/authentication, as it appears is the case from the other possible responses, are you getting the prompts in dialogs instead?
If so, you probably need to enable Display logon prompts in terminal window in the Connection / Logon Actions category (via Default Session). See tip on our website here.
You can also do this via the SessionConfiguration object (version 6.2 and later).
Set objDefaultConfig = crt.OpenSessionConfiguration("Default") objDefaultConfig.SetOption "Auth Prompts in Window", 1 objDefaultConfig.Save
case 1 crt.screen.send "dis ip-pool pool-usage domain pppoe" & VbCr crt.screen.WaitForString "expected_prompt" crt.screen.send "q" & VbCr crt.screen.WaitForString "expected_prompt"
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Display Modes||Rate This Thread|