Add helper function for running remote commands.