Sahih al-Bukhari 6995
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
الرُّؤْيَا الصَّالِحَةُ مِنَ اللَّهِ، وَالْحُلْمُ مِنَ الشَّيْطَانِ، فَمَنْ رَأَى شَيْئًا يَكْرَهُهُ فَلْيَنْفِثْ عَنْ شِمَالِهِ ثَلاَثًا، وَلْيَتَعَوَّذْ مِنَ الشَّيْطَانِ، فَإِنَّهَا لاَ تَضُرُّهُ، وَإِنَّ الشَّيْطَانَ لاَ يَتَرَاءَى بِي "
Narrated Abu Qatada:
The Prophet (ﷺ) said, "A good dream is from Allah, and a bad dream is from Satan. So whoever has seen (in a dream) something he dislikes, then he should spit without saliva, thrice on his left and seek refuge with Allah from Satan, for it will not harm him, and Satan cannot appear in my shape."
Full reference and source
Sahih al-Bukhari 6995 In-book : Book 91, Hadith 14 USC-MSA web (English) : Vol. 9, Book 87, Hadith 124 (deprecated)
View source on Sunnah.com (opens in a new tab)