The Messenger of Allah ﷺ said, "The rider should greet the one walking, the one walking should greet the one standing, and the smaller group should greet the larger one."
أن رسول الله ﷺ قال: يسلم الفارس على الماشي، والماشي على القائم، والقليل على الكثير.
Tirmidhi (2705), Ahmad (23940), Bukhari in Adab al-Mufrad (998), and Tabarani in al-Kabir (18/312) all narrated it, all through the hadith of Haywa bin Shurayh, who said, Abu Hani, whose name is Humayd bin Hani Khawlani, told me, from Abu Ali Janbi, from Fadala bin Ubayd, and he related it. Its chain is sahih. Tirmidhi said, "Hasan sahih, and Abu Ali Janbi's name is Amr bin Malik."