Sahih Muslim 2168a

حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا هُشَيْمٌ، عَنْ سَيَّارٍ، عَنْ ثَابِتٍ الْبُنَانِيِّ، عَنْ أَنَسِ، بْنِ مَالِكٍ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم

مَرَّ عَلَى غِلْمَانٍ فَسَلَّمَ عَلَيْهِمْ .
Anas b. Malik reported that when Allah's Messenger (ﷺ) happened to pass by young boys he would great them

Sahih Muslim — The Book of Greetings — 2168a