The Messenger of Allah ﷺ said, "Dajjal will come, and it will be forbidden for him to enter the passes of Madinah, so he will camp at some of the salt flats adjacent to Madinah. On that day, a man who is the best of people, or among the best of people, will go out to him and say, 'I bear witness that you are Dajjal, about whom the Messenger of Allah ﷺ told us.'Dajjal will say, 'What if I kill this man and then bring him back to life, will you still have any doubt about the matter?'They will say, 'No.'So he will kill him and then bring him back to life. The man will say, 'By Allah, I have never had clearer insight about you than I do today.'Dajjal will then want to kill him, but he will not be given power over him."
أن رسول الله ﷺ قال: يأتي الدجال وهو محرم عليه أن يدخل نقاب المدينة، فينزل بعض السباخ التي تلي المدينة، فيخرج إليه يومئذ رجل وهو خير الناس- أو من خيار الناس- فيقول: أشهد أنك الدجال الذي حدثنا رسول الله ﷺ حديثه، فيقول الدجال: أرأيت إن قتلت هذا ثم أحييته، هل تشكون في الأمر؟ فيقولون: لا، فيقتله ثم يحييه، فيقول: والله ما كنت فيك أشد بصيرة مني اليوم، فيريد الدجال أن يقتله فلا يسلط عليه.
Bukhari reported it in Sahih Bukhari, in the Book of Rulings (7132), and Muslim reported it in the Book of Tribulations (112:2938), both through the route of Abu Yaman, who said, Shuayb informed us, from Zuhri, who said, Ubaydullah bin Utbah bin Masud informed me, that Abu Saeed said, and then he mentioned it. The wording given is Bukhari's, and Muslim referred back to the hadith preceding it.