Sunan Ibn Majah, Book 25, Hadith 3198 (In-Book) ⓘ
It was narrated that Ka’b bin ‘Ujrah said: “The Prophet commanded me, when I was suffering, from live, to shave my head and fast for three days or feed six poor persons. He knew that I did not have an animal I could sacrifice.”
حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نَافِعٍ، عَنْ أُسَامَةَ بْنِ زَيْدٍ، عَنْ مُحَمَّدِ بْنِ كَعْبٍ، عَنْ كَعْبِ بْنِ عُجْرَةَ، قَالَ أَمَرَنِي النَّبِيُّ ـ صلى الله عليه وسلم ـ حِينَ آذَانِي الْقَمْلُ أَنْ أَحْلِقَ رَأْسِي وَأَصُومَ ثَلاَثَةَ أَيَّامٍ أَوْ أُطْعِمَ سِتَّةَ مَسَاكِينَ وَقَدْ عَلِمَ أَنْ لَيْسَ عِنْدِي مَا أَنْسُكُ .
also referenced under: Hadith 3080 (Reference) & Volume 4, Book 25, Hadith 3080 (DarusSalam)