how to run ssh command code example Example 1: ssh run single command ssh -t username@host 'top' Example 2: ssh command ssh -p <portnumber> hostname