Ever shutdown/rebooted the wrong machine through ssh+carelessness? molly-guard comes to the rescue, asking you to type the hostname of the machine you intend to shut down if it detects you are connected by ssh. It's packaged for and available in the main repositories Debian and Ubuntu, I don't know about any other distros.
An example:
[sudo] password for charles:
W: molly-guard: SSH session detected!
Please type in hostname of the machine to reboot: lucifer
Broadcast message from charles@lucifer
(/dev/pts/0) at 17:44 ...
The system is going down for reboot NOW!