(453) بَابُ يُسَلِّمُ الْمَاشِي عَلَى الْقَاعِدِ
Abu Hurayra reported that the Messenger of Allah, may Allah blesshim and grant him peace, said, "The person riding greets the person walking.The person walking greets the person sitting. The small group greets thelarge group."
Reference: Al-Adab Al-Mufrad 993
In-book reference: Book 42, Hadith 29
English translation: Book 42, Hadith 993