It is narrated, most likely as a marfu' hadith, from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) used to command the killing of snakes and would say that whoever leaves them due to fear or apprehension of any of their effects is not from among us. And Sayyiduna Ibn Abbas (may Allah be pleased with them both) used to say that snakes are transformed forms of jinn, just as the Children of Israel were transformed into the form of monkeys.
Hadith Referenceمسند احمد / ومن مسند بني هاشم / 3254