Abu Hurairah reported,

I said, "Messenger of Allah, I am a young man and I fear hardship upon myself, yet I do not have the means to marry women. Shall I castrate myself?"The Prophet ﷺ turned away from me. I repeated my question until I had asked three times.The Prophet ﷺ then said, "Abu Hurayrah, the pen has dried with what you are to encounter, so castrate yourself on that basis or leave it."Abu Abdul-Rahman said, Uzai did not hear this hadith from Zuhri. This is a sound hadith, and Yunus has narrated it from Zuhri.

Nasai 3217

Sahih

أخبرنا يحيى بن موسى قال حدثنا أنس بن عياض قال حدثنا الأوزاعي عن ابن شهاب عن أبي سلمة أن

أبا هريرة قال

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

النسائي 3217صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Marriage
Chapter
Prohibition of celibacy
Numbering
Darussalam 3217
Nasai 3217