Community discussions

MikroTik App
 
gabriellauter
newbie
Topic Author
Posts: 25
Joined: Mon Aug 27, 2007 11:02 pm

run script from linux via ssh

Mon Apr 14, 2008 10:53 pm

hi everyone,

i'm trying to run a script on my mk box remotelly to allow forwarding from my customers and block any other connection.
actually i have a .txt file on my linux machine containing all the ip addresses that should have forwarding enabled.
using bash script I created a script containing mikrotik commands to allow internet browsing

BUT i don't know how to execute this script remotelly

i tryed to copy and paste (ctrl + c; ctrl + v) all the commands on winbox but seems that the script os bigger then the available buffer... bcause only a part of the script is pasted :-[

i also tried to do it via telnet connection
(echo admin; sleep 1; echo password; sleep 1; echo "/ip firewall filter; sleep 1; cat comandos.txt) | telnet [mk ip address]
but it's not working... :-0

does anyone have a solution for my problem?

mk 2.9.46

thanks

gabriel lauter
brazil!!!
 
User avatar
Letni
Member
Member
Posts: 376
Joined: Tue Dec 05, 2006 5:16 am
Location: South Carolina

Re: run script from linux via ssh

Tue Apr 15, 2008 6:06 am

Who is online

Users browsing this forum: No registered users and 44 guests