Manage Linux SysRq over network Using sysrqd
The goal of this keyboard sequences is too be available even if you can’t do anything on your box, because you screwed up everything, or because it’s crashed or under very heavy load.
sysrqd can help you to use SysRq keys when you are not in front of your box,and you need to do Emergency Sync, R/O remount and reBoot.
It is designed to respond under heavy load or half-crashed box, so it might work even if you can’t access to your box for example. In this case, you will be happy to telnet to your box on sysrqd port, enter your password, and then press s, u, b and wait for your server to reboot. You would not have been able to do that since ssh was not responding.
The connection is password protected but not cyphered so you might want to firewall it or to run it on a trusted network.
Install sysrqd in Ubuntu
sudo apt-get install sysrqd
This will complete the installation
To set up your password use the following command
echo "mypassword" > /etc/sysrqd.secret
sudo chmod 0600 /etc/sysrqd.secret
Then, you will be able to telnet to port 4094/tcp.
% telnet localhost 4094
Connected to localhost.localdomain.
Escape character is ‘^]'.
sysrqd password: hello