The Prophet ﷺ said, "The rider greets the one walking, the one walking greets the one sitting, and the smaller group greets the larger group."Ibn al-Muthanna added in his version, "And the younger greets the older."
حدثنا محمد بن المثنى وإبراهيم بن يعقوب قالا حدثنا روح بن عبادة عن حبيب بن الشهيد عن الحسن
عن النبي ﷺ قال يسلم الراكب على الماشي والماشي على القاعد والقليل على الكثير وزاد ابن المثنى في حديثه ويسلم الصغير على الكبير
[Sahih] Ahmad narrated it: 2/510, from Rawh, with the same wording. Bukhari, no. 6232, and Muslim, no. 2160, narrated it from the hadith of Abu Hurairah with the same wording.There are also narrations on this topic from Abdul-Rahman bin Shibl [Ahmad: 3/444, 428, and Bukhari in Adab al-Mufrad, no. 992], Fadala bin Ubayd [coming up: 2705], and Jabir [Bukhari in Adab al-Mufrad, no. 983, and Ibn Hibban, no. 1935].