Volume 4 · Book 54 · Hadith 530
Narrated Nafi: Ibn 'Umar used to kill snakes but when Abu Lubaba informed him that the Prophet had forbidden the killing of snakes living in houses, he gave up killing them.
— Sahih Bukhari, Volume 4, Book 54: Beginning of Creation, Hadith #530