Shutdown over SSH [duplicate]

Solution 1:

You can try this command over SSH:

sudo poweroff

If you want to just send this command over SSH and authenticate in one go, append the command to the regular SSH command:

ssh -t <options> <user>@<hostname> sudo poweroff

Thanks muru for suggesting the -t option to allow for entering the sudo password.