Translation
(92) Afflictions and the End of the World
كتاب الفتن
(26) Chapter: Information about Ad-Dajjal
(26) باب ذِكْرِ الدَّجَّالِ
Sahih al-Bukhari 7124 

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."

حَدَّثَنَا سَعْدُ بْنُ حَفْصٍ، حَدَّثَنَا شَيْبَانُ، عَنْ يَحْيَى، عَنْ إِسْحَاقَ بْنِ عَبْدِ اللَّهِ بْنِ أَبِي طَلْحَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم ‏ "‏ يَجِيءُ الدَّجَّالُ حَتَّى يَنْزِلَ فِي نَاحِيَةِ الْمَدِينَةِ، ثُمَّ تَرْجُفُ الْمَدِينَةُ ثَلاَثَ رَجَفَاتٍ، فَيَخْرُجُ إِلَيْهِ كُلُّ كَافِرٍ وَمُنَافِقٍ ‏"‏‏.‏
Reference : Sahih al-Bukhari 7124
In-book reference : Book 92, Hadith 71
USC-MSA web (English) reference : Vol. 9, Book 88, Hadith 239
  (deprecated numbering scheme)