Only four candidates "met the requisite constitutional and statutory requirements" from a shortlist of 17, the Kenya Independent Electoral and Boundaries Commission (IEBC) said in a statement late Monday.
This is the smallest number of candidates to be cleared to run since multiparty democracy came in the early 1990s.
Aside from Ruto and Odinga, the other candidates vying for the presidency in the August 9 vote include lawyers David Mwaure and George Wajackoyah -- a former spy who once went into exile in Britain.
This year's contest is shaping up to be a two-horse race between the president's erstwhile ally Ruto and 77-year-old former opposition leader Odinga, who now has the backing of outgoing two-term-limited President Uhuru Kenyatta.
All the candidates save for Ruto have chosen women as their running mates, which, should they win, would open the door to Kenya's first female deputy president.
A mainstay of Kenyan politics, Odinga remains hugely popular despite losing four shots at the presidency.
But his fiery anti-establishment image took a knock following his 2018 reconciliation with Kenyatta.
Ruto, 55, was initially anointed by Kenyatta as his successor but found himself marginalised after the 2018 pact between the president and former foe Odinga.
A former agriculture minister, Ruto has lambasted Kenyatta over his economic policies including the country's huge debt burden, vowing to undo them if elected.
As for the other two contenders, Wajackoyah, an eccentric lawyer, is running on a pledge to expand the executive, reduce the working week to four days and legalise marijuana.
Mwaure, who had shown interest in running in 2013 but later shelved his candidacy, has pledged to crack down on corruption, a hot-button issue in Kenya.
The first round of Kenya's presidential election takes place on August 9, 2022 with the second round slated for September 9.