I need a Script to rsh multiple hp boxes and shutdown

Hello I'm serving on a ship that has frequent power issues. Currently if we loose power we need to rush around to multiple UNIX machines and login to Sysadmin and power down each machine before we loose our ups. If sysadmin is asleep or not in the space we have some real problems. I would like to see script that remotes logs into each machine issuing the shutdown command. This way i could log into only one sysadmin on a machine and then automatically shutdown the rest. Any help will be appreciated.

Here is a script that logs into different boxes to change the password:
changepass automate password changes on multiple systems

Most UPS systems have a monitor port which can be read with a serial connection. The system can monitor this and shut itself down when there is a power problem. Do you have any indicator which you can monitor? That might be a better approach.

Because you specificly mention HP boxes, you may have another solution. HP has a package called Service Control Manager. It comes with HP-UX 11i. I understand that clients are available for 11.0 and 10.20 as well. I think it can do what you want; however, I have never used it.

Servicecontrol Manager User's Guide