One can reboot or perform a shutdown of the WD My Cloud via SSH by issuing one of the following commands while logged into the My Cloud via SSH.
Reboot:
/sbin/reboot
Shutdown and power off:
/sbin/shutdown -h -P now
Shutdown only:
/sbin/shutdown -r now
Power off only:
/sbin/poweroff
There is further discussion on the use of these commands and using other programs to issue them at the following thread.