Run Commands on a REmote Machine using Root (sudo / su)

ssh user@host su -c 'cmd'

or

ssh -t user@host sudo 'cmd'

Source: Cyberciti.biz