ssh problem

Hi all,
I have this problem
when i execute this in mikrotik routeros console, it shows me 3 times text
:put text ; :put text ; { :put text ; :put text;}

text
text
text
text

but when i do it via ssh, it interupt on semicolon inside braces:
ssh user@mikrotikmachine ’ :put text ; :put text ; { :put text ; :put text;} ’

text
text
missing closing brace (line 1 column 14)
text

Does anybody know solution?
Using ; didnt help.
thx

Huh. I’d open a bug report with support@mikrotik.com.

Dont understand. Did you or should I?

You should.

if anyone interested - problem is fixed now.

I’m at least as interested in what the problem was in the first place! :slight_smile:

if braces where used in non-interactive command sent to RouterOS through SSH error was reported as displayed in first post of thread.

It means that in will be fixed in ros 5.3? When will come 5.3?

I guess my question is, was it the shell that needed the braces escaped ‘{’ ‘}’, or was this an actual parsing problem with ROS?

actual parsing problem

"cmd; cmd; {cmd; cmd;}"

was split in 4 commands as follows:

cmd;
cmd:
{cmd;
cmd;}

now it will be fed to ROS console as is

now = in next release of ros?
Its possible to somehow patch my devices with ros from 3.3 - 4.17?
Because I cannot upgrade them to newest 5.x - I did it with 2 of tehm and my whole network have colapsed. After upgrading with 5.2 one of them generate 1000pps (without traffic) and halt lot of devices in network. After downgrade it was ok. I have about 50 of RBs in network.

There must some problem with configuration. We are running 5.x version in our network and have not seen such issues.

Things you can try - take router that had issues and get the configuration, upgrade to 5.x (5.3 is currently in testing), if you see problems, do reset0configuration and see if router still has problems, if not, recreate configuration from export you made earlier. It is after all, upgrade of major versions.

Its in runing network, I cant try it now. But when it happend i collect some data for debuging. I have export, suppout and backup files. I also have 10MB traffic dump from this device and devices in nearby. If someone want look at it.

send supout.rif files to support@mikrotik.com maybe problem has been resolved that caused crash or we find something new to fix.

It looks like the same thing that broke using semicolon in ssh commands also broke using newlines, and the line joining slash.

The following works fine in 3.x and 4.x, but not 5.x up to 5.6, although works fine in interactive console.

:if (something) do={ command1
command2
command3
}

it can be remedied by doing

:if (something) do={ command1; command2; command3; }

but this can be a nightmare for readability