Musnad Ahmad 411
It was narrated that ‘Alqamah said:
I was with Ibn Mas`ood when he was with ‘Uthman {رضي الله عنه}. `Uthman (رضي الله عنه) said to him: Do you still feel any desire towards women? When women were mentioned, Ibn Mas`ood said: Come closer, ‘Alqamah. I was a young man (at that time). `Uthman   (رضي الله عنه) said to him: The Messenger of Allah (ﷺ)  came out to some young men of the Muhajireen and said: “Whoever among you has the means to get married, let him do so, for it is more effective in lowering the gaze and guarding chastity, whoever cannot (do that), then fasting is a shield for him.`
حَدَّثَنَا إِسْمَاعِيلُ، حَدَّثَنَا يُونُسُ بْنُ عُبَيْدٍ، عَنْ أَبِي مَعْشَرٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ، قَالَ كُنْتُ مَعَ ابْنِ مَسْعُودٍ وَهُوَ عِنْدَ عُثْمَانَ رَضِيَ اللَّهُ عَنْهُ فَقَالَ لَهُ عُثْمَانُ رَضِيَ اللَّهُ عَنْهُ مَا بَقِيَ لِلنِّسَاءِ مِنْكَ قَالَ فَلَمَّا ذُكِرَتْ النِّسَاءُ قَالَ ابْنُ مَسْعُودٍ ادْنُ يَا عَلْقَمَةُ قَالَ وَأَنَا رَجُلٌ شَابٌّ فَقَالَ لَهُ عُثْمَانُ رَضِيَ اللَّهُ عَنْهُ خَرَجَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَى فِتْيَةٍ مِنْ الْمُهَاجِرِينَ فَقَالَ مَنْ كَانَ مِنْكُمْ ذَا طَوْلٍ فَلْيَتَزَوَّجْ فَإِنَّهُ أَغَضُّ لِلطَّرْفِ وَأَحْصَنُ لِلْفَرْجِ وَمَنْ لَا فَإِنَّ الصَّوْمَ لَهُ وِجَاءٌ‏.‏