Mishkat al-Masabih · Book 3 · Hadith 358
وَعَنْ عَلِيٍّ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «سَتْرُ مَا بَيْنَ أَعْيُنِ الْجِنِّ وَعَوْرَاتِ بَنِي آدَمَ إِذَا دَخَلَ أَحَدُهُمُ الْخَلَاءَ أَنْ يَقُولَ بِسْمِ اللَّهِ» . رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ غَرِيبٌ وَإِسْنَاده لَيْسَ بِقَوي
‘Ali reported God’s messenger as saying, "The covering between the eyes of the jinn and the private parts of the children of Adam when one of them enters the privy is provided by his saying, ‘In the name of God.’” Tirmid…