Tuesday, August 27, 2013

Magic Reboot: When SSH gets stuck

If you ever need to reboot a host, but you cannot SSH in (you have the password, but the session is frozen), you can use the magic reboot method. Here it is:

ssh root@ "echo b > /proc/sysrq-trigger"

This will tell host to write b to the /proc/sysrq-trigger file. This will cause an immediate reboot of the host.

No comments:

Post a Comment