The paper provides a comparative analysis of precursory phenomena in the ionosphere and atmosphere for two strong earthquakes of the same magnitude M7.1 that happened in the same region (North-East from Los Angeles) within a time span of 20 years, the Hector Mine and Ridgecrest earthquakes. Regardless of the similarity of their location (South-Eastern California, near 160 km one from another), there was one essential difference: the Hector Mine earthquake happened during geomagnetically disturbed conditions (essential in the sense of ionospheric precursors identification). In contrast, the quiet geomagnetic conditions characterized the period around the time of the Ridgecrest earthquake. The Hector mine earthquake happened in the middle of the rising phase of the 23-rd solar cycle characterized by high solar activity, while the Ridgecrest earthquake happened by the very end of the 24th cycle under very low solar activity conditions. We provide a comprehensive multi-factor analysis, determine the precursory period for both earthquakes and demonstrate the close similarity of ionospheric precursors. Unlike the majority of papers dealing with earthquake precursor identification based on the “abnormality” of observed time-series mainly determined by amplitude difference between “normal” (usually climatic) behavior and “abnormal” behavior with amplitudes exceeding some pre-established threshold, we used the technique of cognitive recognition of the precursors based on the physical mechanisms of their generation and the morphology of their behavior during the precursory period. These permits to uniquely identify precursors even in conditions of disturbed environment as it was around the time of the Hector Mine earthquake. We demonstrate the close similarity of precursors’ development for both events. The leading time of precursor appearance for the same region and similar magnitude was identical. For the Hector Mine it was 11 October 1999—5 days in advance—and for 2019 Ridgecrest it was 28 June—7 days before the mainshock and five days before the strongest foreshock.