Run ssh commands in chunks