Having installed a recent DSM upgrade, for once it seemed that things were not working quite as it should. It was possible to access files using the standard file interfaces — but not the web services. And without this it is quite difficult to get things done. And on the top of this, I was far away from the NAS.
So I searched for a long time after solutions to rebooting the DSM using terminal. Quite a few suggestions showed up, many about manually resetting by entering something into ttyS1. This did not work. At first I was not able to login as root either, which I was I had been able to in the past. Turns out a few things have changed in recent years.
The solution turned out to be quite simple, and similar to most other Linux environments these days:
Prodiving you have enabled ssh already, make yourself root:
sudo -i
then
reboot
And after booting up everything was working as it should 🙂