كتاب السلام
39  
The Book of Greetings
(37)
Chapter: Killing Snakes Etc.
(37)
باب قَتْلِ الْحَيَّاتِ وَغَيْرِهَا ‏‏
Sahih Muslim 2236 b

Asma' b. 'Ubaid reported about a person who was called as-Sa'ib having said:

We visited Abu Sa'id Khudri. When we had been sitting (with him) we heard a stir under his bed. When we looked we found a big snake, the rest of the hadith is the same. And in this Allah's Messenger (ﷺ) is reported to have said: Verily in these houses there live aged (snakes), so when you see one of them, make life hard for it for three days, and if it goes away (well and good), otherwise kill it for (in that case) it would be a nonbeliever. And he (the Holy Prophet) said (to his Companions): Go and bury your companion (who had died by the snake bite).
وَحَدَّثَنِي مُحَمَّدُ بْنُ رَافِعٍ، حَدَّثَنَا وَهْبُ بْنُ جَرِيرِ بْنِ حَازِمٍ، حَدَّثَنَا أَبِي قَالَ، سَمِعْتُ أَسْمَاءَ بْنَ عُبَيْدٍ، يُحَدِّثُ عَنْ رَجُلٍ، يُقَالُ لَهُ السَّائِبُ - وَهُوَ عِنْدَنَا أَبُو السَّائِبِ - قَالَ دَخَلْنَا عَلَى أَبِي سَعِيدٍ الْخُدْرِيِّ فَبَيْنَمَا نَحْنُ جُلُوسٌ إِذْ سَمِعْنَا تَحْتَ، سَرِيرِهِ حَرَكَةً فَنَظَرْنَا فَإِذَا حَيَّةٌ ‏.‏ وَسَاقَ الْحَدِيثَ بِقِصَّتِهِ نَحْوَ حَدِيثِ مَالِكٍ عَنْ صَيْفِيٍّ وَقَالَ فِيهِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّ لِهَذِهِ الْبُيُوتِ عَوَامِرَ فَإِذَا رَأَيْتُمْ شَيْئًا مِنْهَا فَحَرِّجُوا عَلَيْهَا ثَلاَثًا فَإِنْ ذَهَبَ وَإِلاَّ فَاقْتُلُوهُ فَإِنَّهُ كَافِرٌ ‏"‏ ‏.‏ وَقَالَ لَهُمُ ‏"‏ اذْهَبُوا فَادْفِنُوا صَاحِبَكُمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 2236b
In-book reference : Book 39, Hadith 191
USC-MSA web (English) reference : Book 26, Hadith 5558
  (deprecated numbering scheme)