It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: The rider should greet the one who is walking, the one who is walking should greet the one who is sitting, and the smaller group should greet the larger group.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10625
Hadith Gradingحکم دارالسلام:حديث صحيح، خ: 6231، م: 2160، وهذا إسناد منقطع، الحسن لم يسمع من أبى هريرة