Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "The young should greet the old, the one passing by should greet the one sitting, and the few should greet the many."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18719