The Messenger of Allah ﷺ used to say, "O Allah, I seek refuge in You from the trials of life and death, and from the evil of the false messiah, the Dajjal."
قال حدثنا عفان حدثنا حماد بن سلمة عن عطاء بن أبي ميمونة عن أبي رافع
أن رسول الله ﷺ كان يقول اللهم إني أعوذ بك من فتنة المحيا والممات ومن شر المسيح الدجال
Its isnad is sahih. Bukhari related it 1/211, and Muslim 1/413 no. 588 in "Mosques," and Tirmidhi 5/582 no. 3604, saying, "hasan sahih," and Nasai 4/103 no. 2060, and Ibn Majah 2/1262 no. 3841.