Sahih al-Bukhari, Book 92, Hadith 71 (Bukhari 6855)
Narrated Anas bin Malik:
The Prophet (ﷺ) said, "Ad-Dajjal will come and encamp at a place close to Medina and then Medina will shake thrice whereupon every Kafir (disbeliever) and hypocrite will go out (of Medina) towards him."