Narrated Abu Huraira:The Prophet (ﷺ) said, "The young should greet the old, the passer by should greet the sitting one, and the small group of persons should greet the large group of persons
Hadith No. 6231
Sahih al Bukhari