He said it was one of the things under consideration especially for visitors from seven Muslim majority countries with very weak background screening of their own - Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.
"We're looking at some enhanced or some additional screening," Mr Kelly told a hearing of the House Homeland Security Committee.
"We may want to get on their social media, with passwords," he said.
"It's very hard to truly vet these people in these countries, the seven countries... But if they come in, we want to say, what websites do they visit, and give us your passwords. So we can see what they do on the internet."
"If they don't want to cooperate, then they don't come in" to the United States, he said.
"These are the things we are thinking about," he said.
"But over there we can ask them for this kind of information and if they truly want to come to America, then they will cooperate. If not, next in line."
The seven countries were targeted in president Donald Trump's January 27 immigrant and refugee ban order, which has sense been at least temporarily blocked under court order.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.