ssh run single command

C++
ssh -t username@host 'top'
Source

Also in C++: