Reboot Mikrotik from OSMC on Raspberry Pi

Personas: – MikroTik home router with Internet connection and WiFi LAN – Raspberry Pi with OSMC media center OS (based on Kodi)
Login to OMSC
ssh osmc@
Generate key without password:
ssh-keygen -t dsa
Transfer public key to Mikrotik router.
scp ~/.ssh/ osmc@
Login to MikroTik router:
ssh admin@
Add special group for remote users:
/user group add name="remote_ssh" policy=ssh,reboot,!local,!telnet,!ftp,!read,!write,!policy,!test,!winbox,!password,!web,!sniff,!sensitive,!api,!romon,!dude skin=default
Add new user into „remote_ssh” group:
/user add name=osmc group=remote_ssh password=****** comment='osmc user'
Import public key for „osmc” user:
/user ssh-keys import user: osmc
Login back into OMSC:
ssh osmc@
Create shell script called „”:
cat << EOF >
press <Enter> and paste following text:
# script reboots Mikrotik home router

xbmc-send -a "Notification(MikroTik,Rebooting router...)"
ssh -l osmc -i ~/.ssh/id_dsa "/system reboot"
press <Enter>, write „EOF” (without quotes) and press <Enter> again. You will find „” file in current directory.
Make this script executable:
chmod +x
You can now logout from OSMC ssh session. Following steps we will perform using OSMC GUI with keyboard or remote.
I couldn’t find a way to run my script from GUI in OSMC default skin. Also couldn’t find it in Confluence skin so I decided to install Aeon Nox skin which has such feature built in.
Installing Aeon Nox is easy:
In OSMC GUI go to:
Settings -> Add-ons
choose Install from repository (v15/v16) / Get add-ons (v14)
select Kodi add-on repository
choose Look and feel (v16 and higher)
then Skins
select Aeon Nox
and finally Install
Now go back to Settings -> Appearance ->
from Skin submenu select Aeon Nox and confirm Yes.
New skin should be loaded now.
Now you can add new item on the Start Screen that will allow you to reboot your router.
Disclaimer: this will only work if network connection between your OSMC and your router is still working but only WAN (Internet) connection is down.
From Start Screen go to System -> Skin
select Settings
from Home Window select Setup the Aeon Nox main menu.
In left column select CUSTOM1 and in the right column select Default select action:
In the following window select Custom Item and in keyboard input write:
and press <Enter>.
Go to Edit label and name it Reboot Router.
Be sure that option Enabled is turned on.
Go back to Start Screen and you should find new Reboot Router option. Select it and you sould see notification and after few second your MikroTik should restart.
Inform all members of your family about this item.
Usefull links:
Execute commands with SSH on MikroTik:
Setup Aeon Nox skin:
Full list of Kodi commands: