Runs a given command on a target machine