It is narrated from Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) that he said: A man passed by the Prophet (peace and blessings be upon him), and the Companions of the Prophet (peace and blessings be upon him) (may Allah be pleased with them) saw in him such strength, vigour and energy that they were greatly impressed. They said: "O Messenger of Allah, if only this (effort) were in the path of Allah!" Then the Messenger of Allah (peace and blessings be upon him) said: "If he has gone out striving for the sake of his young children, he is in the path of Allah; if he has gone out for the sake of his very old parents, he too is in the path of Allah; if he is striving to keep himself chaste (and free of begging from people), he is in the path of Allah; but if he has gone out merely for show and boasting, he is in the path of Satan."
Imam al-Tabarani (may Allah have mercy on him) said: "No one narrated this hadith from al-Hakam except Isma'il bin Muslim, and no one narrated it from Isma'il except Hammam; Muhammad bin Kathir is alone in narrating it, and it is not narrated from Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) except with this chain."
Hadith Referenceالمعجم الأوسط / باب الميم / 6835
Hadith Gradingمحدثین:رجال الكبير رجال الصحيح
Hadith Takhrij«قال الهيثمي: رجال الكبير رجال الصحيح «مجمع الزوائد ومنبع الفوائد، ج 4، ص 325»» «أخرجه الطبراني فى «الكبير» برقم: 282، والطبراني فى «الصغير» برقم: 940»