If it's really hung, chances are you won't be able to start a new process, which is what you'd need to be able to do to ssh in or restart it.
Servers that really need to be restarted remotely in this situation often have extra hardware, like another device (I think one is called an RSA card) that allows you to log in and trigger a reboot, or a watchdog timer that looks for something to happen regularly and if it doesn't happen it reboots.
Another possibility is to run your server as a virtual machine under a hypervisor like VMWare, Xen or VirtualBox, and then you can log onto the root machine (called a dom0 in Xen) and reboot the hung virtual machine.