Sahih Muslim , Book 7, Hadith 2734 (USC-MSA)

Kalb b. Ujra (Allah be pleased with him) reported: It was I for whom this verse was revealed (to the Holy Prophet):" Whoever among you is sick or has an ail- ment of the head, he (may effect) a compensation by lasting or alms or a sacrifice" He said: I came to him (the Holy Prophet) and he said: Come Dear. So I went near. He (again) said: Come near. So I went near. Thereupon the Messenger of Allah said: Do the vermins trouble you? Ibn Aun (one of the narrators) said: I think he (Ka'b b. Ujra) replied in the affirmative. He (the Holy Prophet) then commanded to do compensation by fasting or by giving sadaqa (feeding six needy persons) or by sacrifice (of a animal) that is available.

وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا ابْنُ أَبِي عَدِيٍّ، عَنِ ابْنِ عَوْنٍ، عَنْ مُجَاهِدٍ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي لَيْلَى، عَنْ كَعْبِ بْنِ عُجْرَةَ، - رضى الله عنه - قَالَ فِيَّ أُنْزِلَتْ هَذِهِ الآيَةُ ‏{‏ فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ فَفِدْيَةٌ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ‏}‏ قَالَ فَأَتَيْتُهُ فَقَالَ ‏"‏ ادْنُهْ ‏"‏ ‏.‏ فَدَنَوْتُ فَقَالَ ‏"‏ ادْنُهْ ‏"‏ ‏.‏ فَدَنَوْتُ ‏.‏ فَقَالَ صلى الله عليه وسلم ‏"‏ أَيُؤْذِيكَ هَوَامُّكَ ‏"‏ ‏.‏ قَالَ ابْنُ عَوْنٍ وَأَظُنُّهُ قَالَ نَعَمْ ‏.‏ قَالَ فَأَمَرَنِي بِفِدْيَةٍ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ مَا تَيَسَّرَ ‏.‏

sunnah.com