Washington: People connected to the Russian government tried to hack election-related computer systems in 21 states, a US Department of Homeland Security official testified on Wednesday.

Samuel Liles, the Department of Homeland Security's (DHS) acting director of the Office of Intelligence and Analysis Cyber Division, said vote-tallying mechanisms in the US presidential election last year were unaffected and that the hackers appeared to be scanning for vulnerabilities - which Liles likened to walking down the street and looking at homes to see who might be inside.

But hackers successfully exploited a "small number" of networks, Liles said, likening the act to making it through a home's front door.

Liles was testifying before the Senate Intelligence Committee, which is investigating Russia's efforts to meddle in the 2016 presidential election, and his remarks add some clarity to the breadth of the Kremlin's cyber mischief. Officials in Arizona and Illinois had previously confirmed that hackers targeted their voter registration system, though news reports suggested the Russian effort was much broader.