Missing wait for response in SSH.net buffer and mi (General questions)
Hi,
I have the following code:
ssh1.Hostname = 10.248.6.254
ssh1.Protocol = SSH.SupportedProtocols.Telnet
ssh1.Blocking = True
ssh1.Protocol = 1 'Telnet
ssh1.Port = 23 ' first Protocol then Port Property
ssh1.Timeout = 120
ssh1.StripANSI = True
Try
ssh1.Connect()
a = ssh1.WaitFor( Password: , 10)
TextBox1.Text = TextBox1.Text & a
ssh1.Send( cisco + vbLf)
a = ssh1.WaitFor( regex:[$ #>]$ , 10)
TextBox1.Text = TextBox1.Text & a
ssh1.Send( sho env + vbLf)
a = ssh1.WaitFor( regex:[$ #>]$ , 10)
TextBox1.Text = TextBox1.Text & a
ssh1.Send( sho int desc + vbLf)
a = ssh1.WaitFor( regex:[$ #>]$ , 10)
TextBox1.Text = TextBox1.Text & a
MsgBox( done )
Catch ex As Exception
MsgBox( Exception & ex.Message)
End Try
What is happening is that the a seems to miss what i am waiting for. Let me explain, in the output i get back into a the character i am waiting for is not appended to variable a
Also
I have 3 commands one after each other, if i just run this app then all i get back is the first bit of text and not the results of the sho env or sho int desc .
If i put a debug line in and step through it then i get the results, as though it is moving on before i get the results as the last character is in the buffer.
If you hanve any suggerstions that would be great. The ending app will be codeded in asp.net (VB) but to make life easier i am testing this in vb.net, Hopefully we can sort this out as i am keen to purchase this control if we can get it fixed as i am running on the trial version i guess have 22 days remaining.
Thanks
Simon [code][/code]
Complete thread:
- Missing wait for response in SSH.net buffer and mi - Simon, 2009-04-23, 14:07
- Re: Missing wait for response in SSH.net buffer an - wodDamir, 2009-04-23, 14:16
- Re: Missing wait for response in SSH.net buffer an - Simon, 2009-04-23, 14:26
- Re: Missing wait for response in SSH.net buffer an - wodDamir, 2009-04-23, 14:36
- Re: Missing wait for response in SSH.net buffer an - Sunny, 2009-04-23, 16:48
- Re: Missing wait for response in SSH.net buffer an - woddrazen, 2009-04-23, 17:11
- Re: Missing wait for response in SSH.net buffer an - Sunny, 2009-04-23, 17:18
- Re: Missing wait for response in SSH.net buffer an - woddrazen, 2009-04-23, 18:48
- Re: Missing wait for response in SSH.net buffer an - Simon, 2009-04-24, 10:40
- Re: Missing wait for response in SSH.net buffer an - woddrazen, 2009-04-23, 18:48
- Re: Missing wait for response in SSH.net buffer an - Sunny, 2009-04-23, 17:18
- Re: Missing wait for response in SSH.net buffer an - woddrazen, 2009-04-23, 17:11
- Re: Missing wait for response in SSH.net buffer an - Sunny, 2009-04-23, 16:48
- Re: Missing wait for response in SSH.net buffer an - wodDamir, 2009-04-23, 14:36
- Re: Missing wait for response in SSH.net buffer an - Simon, 2009-04-23, 14:26
- Re: Missing wait for response in SSH.net buffer an - wodDamir, 2009-04-23, 14:16