Remote shutdown

Hi guys,

I have a UPS coupled to a CentOS Linux Firewall / Webserver, which is on the same network as my RouterOS server. The two boxes are right next to each other actually.

Now, the UPS only has 1 serial connector and at present is connected to the Linux Weberver. Is there a way one can remotely shutdown the RouterOS server, through SSH or something, basically have a script that logs in and runs the /system shutdown script to turn off the system?

Or otherwise a way for the RouterOS server to remotely turn off the Linux Webserver machine? Either way I dont mind which server the UPS is connected to, I just need both servers to switch off when the battery of the UPS reaches a critical level.

If anybody can assist me with this I would greatly appreciate it.

Thanks.

What type of UPS is it? If its an APC unit, some of the higher end models support a module that provides an extra two serial ports for connecting up to 3 computers.

Unfortunatally not one of those, its a Mecer UPS, 2KVa, I think they name it the Blazer 2000.

On windows and linux they use the Winpower software to monitor their UPSs.

Still no answer on this? I also want to do this.

I have a Meissner UPS with a serial connection to a WindowsXP box running Winpower.
Winpower software can shutdown other PCs on the network (if they also run Winpower) and can execute a command (or batch script) before shut down.

I would like to shut down RouterOS before the UPS shuts down.
How do I do this from a remote script?

If I can shut down all the hosts on my network from RouterOS, even better - then I don’t have to use the Winpower software.

Thanks for any suggestions.

you can set up your web server to shutdown your router

you ave to create key for users, and login ssh using key and issue one command /system shutdown


ssh -l admin -i key_dsa -o StrictHostKeyChecking=no -o PreferredAuthentications=publickey "/system shutdown"