The Prophet ﷺ said, "True dreams are from Allah, and disturbing dreams are from Satan. Whoever sees something he dislikes should seek refuge in Allah from it, spit lightly to his left three times, and not mention it to anyone. If he does so, it will not harm him."
قال النبي ﷺ: الرؤيا من الله، والحلم من الشيطان، فمن رأى من ذلك شيئا يكرهه، فليتعوذ بالله منها، ولينفث عن يساره ثلاثا، ولا يذكرها لأحد فإن ذلك لا يضره.
Nasai narrated it in Kubra (10672) from Ali bin Harb, who said, Ibn Fudayl narrated to us, who said, Yahya bin Saeed narrated to us, from Abu Salama, from Abu Hurairah, and he related it.He also narrated it (10674) from Ali bin Hajar, who said, Ismail narrated to us, from Muhammad, from Abu Salama, from Abu Hurairah, and he related something similar.With these two chains, the hadith is sahih. Muhammad here is Ibn Amr bin Alqama bin Waqqas, and Ismail is Ibn Jafar.