Community discussions

MikroTik App
 
matthysdt
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Jun 01, 2010 11:19 am

Programmatically execute scripts on a Mikrotik from outside.

Wed Jan 18, 2012 11:50 am

I need to create a super simple application that will allow a client to switch their internet connectivity between 3G and ADSL on their router.
I don't want to give them any other access to the router.

What I need is to be able to log in to the router programmatically (with an app I create) and run whatever script I need.

I assume that this can be accomplished using ssh, but I can't figure out how.

Do I HAVE to use key pair? Can't I just login with a user/pass each time? Example?

My app will create a normal socket connection to the mikrotik, what is the correct port for ssh? 22 or 23?

Any assistance appreciated!
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Programmatically execute scripts on a Mikrotik from outs

Wed Jan 18, 2012 3:24 pm

A more reliable way is to use the API. There are clients for various languages listed at the bottom.

If your language of choice is not in there and you make your own client (or you make a better implementation with an existing langauge), I'm sure MikroTik users will appreciate it if you share it :P .
 
matthysdt
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Jun 01, 2010 11:19 am

Re: Programmatically execute scripts on a Mikrotik from outs

Fri Jan 20, 2012 12:53 pm

A more reliable way is to use the API. There are clients for various languages listed at the bottom.

If your language of choice is not in there and you make your own client (or you make a better implementation with an existing langauge), I'm sure MikroTik users will appreciate it if you share it :P .
Oh, there are API's!? Great, I will have a look, thank you!!