It is narrated from Sayyiduna Fadalah bin Ubayd (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The horseman should greet the one walking and the one standing, and the few should greet the many."
Hadith Referenceالمعجم الكبير للطبراني / باب الفاء / 15896