Anas b. Malik reported Allah's Messenger (ﷺ) as saying
When the People of the Book offer you salutations, you should say: The same to you.
Anas reported that the Companions of Allah's Apostle (ﷺ) said to him
The People. of the Book offer us salutations (by saying as-Salamu- 'Alaikum). How should we reciprocate them? Thereupon he said: Say: Wa 'Alaikum (and upon you too).
Ibn 'Umar reported Allah's Messenger (ﷺ) as saying
When the Jews offer you salutations, some of them say as-Sam-u-'Alaikum (death be upon you). You should say (in response to it): Let it be upon you.
This hadith has been narrated on the authority of Ibn 'Umar through another chain of transmitters with a slight variation of wording.
'A'isha reported that a group of Jews came to Allah's Messenger (ﷺ) and sought his audience and said
As-Sam-u-'Alaikum. A'isha said in response: As-Sam-u-'Alaikum (death be upon you) and curse also, whereupon Allah's Messenger (ﷺ) said: 'A'isha, verily Allah loves kindness in every matter. She said: Did you bear what they said? Thereupon he said: Did you not hear that I said (to them): Wa 'Alaikum.
This hadith has been transmitted on the authority of Zuhri that Allah's Messenger (ﷺ) said
I said 'Alaikum, and the transmitter did not make mention of the word "and".
'A'isha reported that some Jews came to Allah's Apostle (ﷺ) and they said
Abu'l-Qasim (the Kunya of the Holy Prophet), as-Sam-u-'Alaikum, whereupon he (the Holy Prophet) said: Wa 'Alaikum. A'isha reported: In response to these words of theirs, I said: But let there be death upon you and disgrace also, whereupon Allah's Messenger (ﷺ) said: 'A'isha, do not use harsh words. She said: Did you hear what they said? Thereupon he (the Holy Prophet) said: Did I not respond to them when they said that; I said to them: Wa 'Alaikum (let it be upon you).
This hadith has been reported on the authority of A'znash with a slight variation of wording. 'A'isha understood their meaning and cursed them and Allah's Messenger (ﷺ) said
'A'isha. (do not do that) for Allah does not like the use of harsh words, and it was at this stage that this verse of Allah. the Exalt. ed and Glorious. was revealed:" And when they come to thee, they greet thee with a greeting with which Allah greets thee not" (Iviii. 8) to the end of the verse.
Jabir b. Abdullah reported that some people from amongst the Jews said to Allah's Messenger (ﷺ) Abu'l-Qasim. as-Sam-u-'Alaikum, whereupon he said
Wa 'Alaikum, A'isha was enraged and asked him (Allah's Apostle) whether he had not heard what they had said. He said, I did hear and I retorted to them (and the curse that I invoked upon them would receive response from Allah), but (the curse that they invoked upon us) would not be responded.
Abu Huraira reported Allah's Messenger (ﷺ) as saying
Do not greet the Jews and the Christians before they greet you and when you meet any one of them on the roads force him to go to the narrowest part of it.
This hadith has been narrated on the authority of Suhail with the same chain of transmitters but with a slight variation of wording. The hadith transmitted on the authority of Waki', the words are 'When you meet the Jews." And in the hadith transmitted on the authority of Shu'ba, the words are
'When you meet the People of the Book." And in the hadith transmitted on the authority of Jarir the words are:" When you meet them," but none amongst the polytheists has been mentioned explicitly by name.