I ran into a problem yesterday where I could SSH into a remote machine but a majority of the bash commands weren’t working and were giving an “Input/ouput error”, including the shutdown command. Upon further inspection, this particular machine, which was a thin client with 128 MB of flash storage, had run out of drive space. The suggestion on this stack exchange article worked perfectly so I just wanted to document it here for my own future reference.
As long as you have root access, you can run the following command to force a system reboot:
echo b > /proc/sysrq-trigger