مُسْنَدُ أَحْمَدَ
Musnad Ahmad 4009
Musnad of Abdullah bin Mas'ood
It was narrated that 'Abdur-Rahman bin Yazeed said: We entered upon ‘Abdullah, and ‘Alqamah and al-Aswad were with him. He narrated a hadeeth and I think he only narrated it for my sake; I was the youngest of the people. He said: We were with the Messenger of Allah (ﷺ), young men who had nothing. And he said: “O young men, whoever among you can afford it, let him get married, for it is more effective in lowering the gaze and guarding one's chastity. And whoever cannot afford it should fast, for it will be a shield for him."
Musnad Ahmad 4035Its isnad is saheeh, al-Bukhari (5066) and Muslim (1400)]