Abu Qatada reported,

The Messenger of Allah ﷺ said, "A true dream is from Allah, and a disturbing dream is from Satan. If any of you sees something he dislikes, let him spit lightly to his left three times, seek refuge with Allah from the accursed Satan three times, and turn over from the side he was lying on."

Ibn Majah 3909

Sahih

حدثنا محمد بن رمح حدثنا الليث بن سعد عن يحيى بن سعيد عن أبي سلمة بن عبد الرحمن بن عوف

عن أبي قتادة

أن رسول الله ﷺ قال الرؤيا من الله والحلم من الشيطان فإذا رأى أحدكم شيئا يكرهه فليبصق عن يساره ثلاثا وليستعذ بالله من الشيطان الرجيم ثلاثا وليتحول عن جنبه الذي كان عليه

ابن ماجه 3909صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Dream interpretation
Chapter
One who sees a dream he dislikes
Numbering
Darussalam 3909
Ibn Majah 3909