Re: Recieving data from ssh login to Mikrotik hos (General questions)

by Johnboy, (7198 days ago) @ Johnboy

Your are right, I tested my code with demo.mt.lv and it worked !! same output like in Putty!

I did some more tests and found out one funny thing ...
this code produces nothing:


[code]
Console.WriteLine(Ssh.Execute( /system clock print & vbCrLf, regex:[[a-z]+@[a-zA-z.]+][a-zA-z0-9 ]+> $ ))
Ssh.Receive()
[/code]

This code:

[code]
Console.WriteLine(Ssh.Execute( /system clock print & vbCrLf, regex:[[a-z]+@[a-zA-z.]+][a-zA-z0-9 ]+> $ ))
Ssh.Receive()

Console.WriteLine(Ssh.Execute( /system clock print & vbCrLf, regex:[[a-z]+@[a-zA-z.]+][a-zA-z0-9 ]+> $ ))
Ssh.Receive()
[/code]

produces this:
[code]
[demo@Hotspot] >

/system clock print
[demo@Hotspot] > /system clock print
time: 19:01:26
date: apr/05/2006
time-zone: +01:00
dst-active: no

[demo@Hotspot] >
[/code]

and so on ... 3 times execute produces 2 times output and so on ... he always loses the last command result ...

I have always tested it with one execute, so it looses it !!! Becaouse of that I got no output so far ...

But why does it works with demo.mt.lv ... same Mikrotik version ... or where is the data resultset for the last command execute ??

Johnboy

[code][/code]

locked

Complete thread: