Sahih Muslim 1201 f
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
وَحَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا خَالِدُ بْنُ عَبْدِ اللَّهِ، عَنْ خَالِدٍ، عَنْ أَبِي قِلاَبَةَ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي لَيْلَى، عَنْ كَعْبِ بْنِ عُجْرَةَ، رضى الله عنه أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم مَرَّ بِهِ زَمَنَ الْحُدَيْبِيَةِ فَقَالَ لَهُ آذَاكَ هَوَامُّ رَأْسِكَ " . قَالَ نَعَمْ . فَقَالَ لَهُ النَّبِيُّ صلى الله عليه وسلم " احْلِقْ رَأْسَكَ ثُمَّ اذْبَحْ شَاةً نُسُكًا أَوْ صُمْ ثَلاَثَةَ أَيَّامٍ أَوْ أَطْعِمْ ثَلاَثَةَ آصُعٍ مِنْ تَمْرٍ عَلَى سِتَّةِ مَسَاكِينَ " ."
Ka'b b. Ujra (Allah be pleased with him) reported that the Messenger of Allah (ﷺ) happened to pass by him during the period of Hudaibiya. Thereupon he (the Holy Prophet) said to him (Ka'b b. Ujra):
Do these vermins trouble your head? He said: Yes. Thereupon he (the Holy Prophet) said: Shave your head. Then sacrifice a goat or observe fasts for three days or give three sits of dates to feed six needy persons.
Full reference and source
Sahih Muslim 1201 f In-book : Book 15, Hadith 92 USC-MSA web (English) : Book 7, Hadith 2737 (deprecated)
View source on Sunnah.com (opens in a new tab)