Monday, 08 August 2022 20:15

Remotely emergency (force) reboot linux via FTP when SSH has failed

You can force boot a remote linux machine with (as root):-

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

But what if the SSH service has died because you tried to do it gracefully and it borked (or it was stuffed for another reason).

If you have an ftp server running with a root login (which of course you would never do) you can create two text files 'sysrq' and 'sysrq-trigger' the first containing just '1' and the second just 'b'. Copy them to relevant directories as shown above and your good to go!

 

Related items

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.