Yahya related to me from Malik from Humayd bin Qays from MujahidAbu'l Hajjaj from Ibn Abi Layla from Kab ibn Ujra that the Messengerof Allah, may Allah bless him and grant him peace, said to him,"Perhaps your pests are troubling you?" He replied that indeed theywere, and the Messenger of Allah, may Allah bless him and grant himpeace, said, "Shave your head and fast three days or feed six poor menor sacrifice a sheep."
USC-MSA web (English) reference: Book 20, Hadith 247
Arabic reference: Book 20, Hadith 944