Page 1 of 1

ِAPI in C Sharp

Posted: Tue Apr 28, 2015 5:53 pm
by aonallah
Hiii

I use this class in c#
http://wiki.mikrotik.com/wiki/API_in_C_Sharp

I need to enable SSH and Telnet use this commend

/ip service enable ssh
/ ip service enable telnet


but I can't make the right commend ..... :(
--------------------------------------------------------------
I try this but it's not work...

mikrotik.Send("/ip/service/enable");
mikrotik.Send("=ssh", true);

----------or-----

mikrotik.Send("/ip/service/enable/ssh");

------or---------
mikrotik.Send("/ip/service");
mikrotik.Send("=ssh=enable", true);

--------or-------------
mikrotik.Send("/ip/service");
mikrotik.Send("=ssh enable", true);

----------------------


help ....

Re: ِAPI in C Sharp

Posted: Tue Apr 28, 2015 6:12 pm
by boen_robot
Try
mikrotik.Send("/ip/service/enable");
 mikrotik.Send("=numbers=ssh", true);
In general, when in doubt, go to the menu/command from terminal, and press "?" to see all possible argument names. Unnamed ones have "<" and ">" around them. Most commands on most menus use "numbers", but that's a convention, not a rule.