Sunan an Nasai 2060
The Book of Funerals
أَخْبَرَنَا يَحْيَى بْنُ دُرُسْتَ، قَالَ حَدَّثَنَا أَبُو إِسْمَاعِيلَ، قَالَ حَدَّثَنَا يَحْيَى بْنُ أَبِي كَثِيرٍ، أَنَّ أَبَا سَلَمَةَ، حَدَّثَهُ عَنْ أَبِي هُرَيْرَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ كَانَ يَقُولُ " اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ عَذَابِ الْقَبْرِ وَأَعُوذُ بِكَ مِنْ عَذَابِ النَّارِ وَأَعُوذُ بِكَ مِنْ فِتْنَةِ الْمَحْيَا وَالْمَمَاتِ وَأَعُوذُ بِكَ مِنْ فِتْنَةِ الْمَسِيحِ الدَّجَّالِ " .
It was narrated from Abu Hurairah that the Messenger of Allah used to say:"Allahumma inni a udhu bika min adhabil-qabri wa a 'udhu bika min 'adhabin-nar, wa a 'udhu bika min fitnatil-mahya wal-mamat, wa audhu bika min fitnatil-masihid-dajjal (O Allah, I seek refuge with you from the torment of the grave, and I seek refuge with You from the torment of the Fire, and I seek refuge with You from the trial of the Dajjal)
Grading: Abu Ghuddah: Sahih · Al-Albani: Sahih · Zubair Ali Zai: Isnaad Sahih
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.