cisco devices (General questions)
Has anyone written any code to pull cisco configs? I have attempted to and it seems the data received event never fires. I am new to programming and any help would be appreciated. here is the code --
Module Module1
Dim WithEvents ssh As New WeOnlyDo.Client.SSH
Sub Main()
ssh.Hostname = 1.1.1.1
ssh.Login = user
ssh.Password = password
ssh.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto
ssh.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto
ssh.Blocking = True
ssh.Command = ( sh run & vbCrLf)
ssh.Connect()
End Sub
Private Sub ssh_ConnectedEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SSH.ConnectedArgs) Handles ssh.ConnectedEvent
MsgBox( connected , MsgBoxStyle.Information, test )
End Sub
Private Sub ssh_DataReceivedEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SSH.DataReceivedArgs) Handles ssh.DataReceivedEvent
Dim st As String
Dim fs As New FileStream( c:config.txt , FileMode.Create)
Dim s As New StreamWriter(fs)
st = ssh.Receive
s.Write(st)
End Sub
End Module
Complete thread:
- cisco devices - epoelke, 2005-02-03, 02:20
- Re: cisco devices - wodSupport, 2005-02-03, 10:02
- Re: cisco devices - epoelke, 2005-02-03, 21:18
- Re: cisco devices - wodSupport, 2005-02-03, 22:01
- Re: cisco devices - epoelke, 2005-02-03, 23:01
- Re: cisco devices - wodSupport, 2005-02-03, 22:01
- Re: cisco devices - epoelke, 2005-02-03, 21:18
- Re: cisco devices - wodSupport, 2005-02-03, 10:02