To shutdown a remote machine using SSH, use the following command:

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

Reference