Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrated that he heard the Messenger of Allah (peace and blessings be upon him) say: "Kill the one with two stripes and the short-tailed one, for these two take away eyesight and cause miscarriage."
Abdullah bin Umar (may Allah be pleased with them both) said: I would not leave any snake without killing it, until Abu Lubabah bin al-Mundhir and Zayd bin al-Khattab (may Allah be pleased with them both) saw me pursuing one of the snakes that live in houses, and the two of them stopped me from killing it. I said: The Messenger of Allah (peace and blessings be upon him) commanded that they be killed. The two of them said: He (peace and blessings be upon him) forbade killing the snakes that live in houses.
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 4631