Anas bin Malik reported,

A Jewish man passed by the Messenger of Allah ﷺ and his companions and said, "As-samu alaykum."The Prophet of Allah ﷺ asked, "Do you know what this man said?"They replied, "He greeted you with peace, Messenger of Allah."He said, "No, rather he said such and such." Then he said, "Bring him back to me."So they brought him back, and the Prophet asked, "Did you say, 'As-samu alaykum'?"The man replied, "Yes."At that point the Prophet of Allah ﷺ said, "When any of the People of the Book greets you, respond, 'And upon you,' meaning, and upon you whatever you said."

Ahmad 13459

Sahih

حدثنا عبد الوهاب عن سعيد عن قتادة

عن أنس بن مالك

أن يهوديا مر على رسول الله ﷺ وأصحابه فقال السام عليكم فقال نبي الله ﷺ أتدرون ما قال هذا قالوا سلم يا رسول الله قال لا ولكنه قال كذا وكذا ثم قال ردوه علي فردوه عليه فقال قلت السام عليكم قال نعم فقال نبي الله ﷺ عند ذلك إذا سلم عليكم أحد من أهل الكتاب فقولوا وعليك أي وعليك ما قلت

أحمد 13459صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 13459
Ahmad 13459