exec cmd on remote target and return the results