Re: Can't Telnet to Cisco equipment - WeOnlyDo Discussion board

Re: Can't Telnet to Cisco equipment (General questions)

by woddrazen, Tuesday, February 05, 2008, 20:05 (6136 days ago) @ rpissm

Hi Johnny,


Please try something like this:
[code]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 = IP
wodSSH1.Login = USER
wodSSH1.Password = PASS
wodSSH1.Connect

wodSSH1.WaitFor ( regex:[$ #>] $ ) 'wait for prompt
wodSSH1.DataReady = 0
Wscript.Echo(wodSSH1.Execute( show ver + vbLf, regex:[$ #>] $ )) 'execute command and receive it in message box
wodSSH1.Disconnect[/code]
Let us know how it goes.


Regards,
Drazen


Complete thread: