Make ssh commands execute sequentially and only procede if the previous command succeeds