The Messenger of Allah ﷺ said, "These privies are frequented by devils, so when one of you enters the lavatory, let him say, 'I seek refuge in Allah from male and female devils.'"
عن رسول الله ﷺ قال: إن هذه الحشوش محتضرة، فإذا أتى أحدكم الخلاء فليقل: أعوذ بالله من الخبث والخبائث.
Abu Dawud (6), Ibn Majah (296) narrated it, and Ibn Khuzayma (69), Ibn Hibban (1408), and Hakim (1/187) graded it sahih, all of them through Shuba, from Qatada, from Nadr bin Anas, from Zayd bin Arqam, who related the same. Its isnad is sahih."Al-hushush" means latrines, and the root meaning of "hushsh" is a dense cluster of palm trees, since people used to relieve themselves there before latrines were built inside houses. "Muhtadara" means that the devils frequent it. Khattabi provided this explanation. There are other hadiths on this same meaning mentioned in the chapter on purification.