Retry 3 times while attempting to run the SSH command