Sahih Muslim , Book 23, Hadith 4991 (USC-MSA) ⓘ
Jabir reported Allah's Messenger as saying: Cover vessels, waterskins, close the doors and extinguish the lamps, for the Satan does not loosen the waterskin, does not open the door and does not uncover the vessels. And if one amongst you fails to find (something) to cover it well, he should cover it by placing (a piece of) wood across it. Qutaiba did not mention the closing of the doors in the hadith transmitted by him.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا لَيْثٌ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ رُمْحٍ، أَخْبَرَنَا اللَّيْثُ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَالَ " غَطُّوا الإِنَاءَ وَأَوْكُوا السِّقَاءَ وَأَغْلِقُوا الْبَابَ وَأَطْفِئُوا السِّرَاجَ فَإِنَّ الشَّيْطَانَ لاَ يَحُلُّ سِقَاءً وَلاَ يَفْتَحُ بَابًا وَلاَ يَكْشِفُ إِنَاءً فَإِنْ لَمْ يَجِدْ أَحَدُكُمْ إِلاَّ أَنْ يَعْرُضَ عَلَى إِنَائِهِ عُودًا وَيَذْكُرَ اسْمَ اللَّهِ فَلْيَفْعَلْ فَإِنَّ الْفُوَيْسِقَةَ تُضْرِمُ عَلَى أَهْلِ الْبَيْتِ بَيْتَهُمْ " . وَلَمْ يَذْكُرْ قُتَيْبَةُ فِي حَدِيثِهِ " وَأَغْلِقُوا الْبَابَ " .
also referenced under: Book 36, Hadith 120 (In-Book) & Hadith 2012 (Reference)