catch ssh errors when retrying instance connect