Abu Hurairah reported,

I said, "Messenger of Allah, I am a young man and I fear falling into sin, yet I cannot afford to marry."He remained silent. Then I said the same again, and he remained silent. Then I said the same again, and he remained silent. Then I said the same again.The Prophet ﷺ said, "Abu Hurayrah, the pen has dried with what you are destined to encounter, so castrate yourself if you wish, or leave it."

Azami 6184

Sahih

عن أبي هريرة قال

قلت يا رسول الله إني رجل شاب، وأنا أخاف على نفسي العنت ولا أجد ما أتزوج به النساء، فسكت عني، ثم قلت مثل ذلك، فسكت عني، ثم قلت له مثل ذلك، فسكت عني. ثم قلت مثل ذلك. فقال النبي ﷺ: يا أبا هريرة جف القلم بما أنت لاق، فاختص على ذلك أو ذر.

الأعظمي 6184صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Marriage and its conditions
Section
Encouragement of youth to marry and the dislike of celibacy and castration
Numbering
Jami al-Kamil 6184 (2nd edition)
Azami 6184