Re: Cant Telnet to Cisco equipment (General questions)
Hello again,
YAHOOOOOOOOOOOOOOOOOOOOOOOOOO! IT WORKED!!!!!!!!!!!!!!!!!!!!
Here's the entire script, which will be of use to many of us who are trying to Telnet to Cisco equipment:
----------------
Set wodssh1 = WScript.CreateObject( WeOnlyDo.wodSSHCom.1 )
wodSSH1.Protocol = 1 'Telnet
wodSSH1.Port = 23 ' first Protocol then Port Property
wodSSH1.Timeout = 10
wodSSH1.Blocking = 1 'True
wodSSH1.HostName = HOST
wodSSH1.Login = USERID
wodSSH1.Password = PASSWORD
wodSSH1.StripANSI = True
wodSSH1.Connect
Dim a,b,wodSSH1
wodSSH1.WaitFor ( regex:[$ #>]$ )
wodSSH1.DataReady = 0
wodSSH1.Send show interface + vbLf ' Cisco command goes here
b = CStr(wodSSH1.WaitFor( --More-- ))
On Error Resume Next
wodSSH1.Timeout = 10
Do
wodSSH1.Send ( )
a = CStr(wodSSH1.WaitFor( --More-- ))
If Err.Number <> 0 Then
a =
End If
b = b + a
Loop Until Len(a) = 0
b = b + wodSSH1.Receive 'receive rest
wodssh1.send exit & vblf
Wscript.Echo( b )
----------------
Thank you again for your speedy assistance!
Johnny
[:cool:][:cool:][:cool:][:cool:][:cool:]
Complete thread:
- Can't Telnet to Cisco equipment - rpissm, 2008-02-05, 19:54
- Re: Can't Telnet to Cisco equipment - woddrazen, 2008-02-05, 20:05
- Re: Can't Telnet to Cisco equipment - rpissm, 2008-02-05, 21:08
- Re: Cant Telnet to Cisco equipment - woddrazen, 2008-02-05, 23:25
- Re: Cant Telnet to Cisco equipment - rpissm, 2008-02-06, 19:35
- Re: Cant Telnet to Cisco equipment - woddrazen, 2008-02-05, 23:25
- Re: Can't Telnet to Cisco equipment - rpissm, 2008-02-05, 21:08
- Re: Can't Telnet to Cisco equipment - woddrazen, 2008-02-05, 20:05