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.
فِيَّ أُنْزِلَتْ هَذِهِ الآيَةُ { فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ فَفِدْيَةٌ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ} قَالَ فَأَتَيْتُهُ فَقَالَ ادْنُهْ فَدَنَوْتُ فَقَالَ ادْنُهْ فَدَنَوْتُ فَقَالَ ﷺ أَيُؤْذِيكَ هَوَامُّكَ قَالَ ابْنُ عَوْنٍ وَأَظُنُّهُ قَالَ نَعَمْ قَالَ فَأَمَرَنِي بِفِدْيَةٍ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ مَا تَيَسَّرَ