Send Ctrl-Alt-Del over SSH?
Solution 1:
If you are connected to a serial console and your kernel has CONFIG_MAGIC_SYSRQ
and /proc/sys/kernel/sysrq
enabled (default on my Ubuntu machines), you can try BREAK, ALT-BREAK or CTRL-BREAK (depends on the SSH
to serial converter).
If that works, you can press h (within 5 seconds) to get a list of available commands ("s = sync filesystems
" and "b = force immediate reboot
" are maybe what you are looking for).
For more information, have a look at linux/Documentation/sysrq.txt
Solution 2:
You can use the Sysrq trigger in order to make an immediate reset (it's like pressing ALT-BREAK-b):
echo b >/proc/sysrq-trigger
BEFORE that, you might want to sync all filesystems, to not lose any data:
echo s >/proc/sysrq-trigger
This might only work if CONFIG_MAGIC_SYSRQ is enabled in your kernel. The possible keys are explained at Wikipedia btw.
Solution 3:
In a comment you mention (ttyS0) - this isn't the local console, it's a serial console.
I don't think you can do Ctrl-Alt-Del from the serial console.
http://osdir.com/ml/linux.hardware.dell.poweredge/2003-01/msg00200.html suggests a way getting magic-sysrq working over serial - maybe this would be sufficient for rebooting a server?