Need to make a script to SSH and run commands

So I have a Ruckus Wireless Controller on a network. By default the Zone Director filters Multicast packets. This prevents Computers on the network from reaching the Lutron RA2 controllers.

I have to log into the ZoneDirector via SSH and find the Wireless LAN, then issue the following CLI commands.

/system ssh 192.168.8.250 user=user
user1
password
enable
debug
remote_ap_cli -A “set qos wlan1 directed multicast disable”
remote_ap_cli -A “set qos wlan33 directed multicast disable”
remote_ap_cli -A “set qos eth0 directed multicast disable”
quit
exit

I confirmed this works using Winbox in New Terminal and telnet/ssh client

Now here is why I need to script this… this change to the APs… is issued to them at RUNTIME. It does not survive and AP reboot.

Requiring me to log back into the ZoneDirector and Issue the commands again.

What I need to do is properly format it so i can save it as a script and issue the command everytime the AP drops offline then comes back.

So could someone show me how to format it to save as a script.

Thanks

Not sure about your topology and/or the devices you named above, so unable to try think out of the box for a better solution than just automating something which is not good to start off.

Anyways, that looks like a pretty simple script… did you have a look to the Manual? https://wiki.mikrotik.com/wiki/Manual:Scripting and the examples? https://wiki.mikrotik.com/wiki/Manual:Scripting-examples

what have you tried so far? share your code pls… you do have other unanswered questions in scripting, maybe time to get your hands dirty :smiley: