Narrated Ali ibn Abu Talib: Abu Dawud said: Al-Hasan ibn Ali traced this tradition back to the Prophet ﷺ: When people are passing by, it is enough if one of them gives a salutation on their behalf, and that it is enough for those who are sitting if one of them replies.
Hadith Referenceسنن ابي داود / أبواب السلام / 5210
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:حسن, مشكوة المصابيح (4648), وللحديث شاھد عند الطبراني في الكبير (3/ 82، 83 ح 2730 وسنده حسن)