I came to the Prophet ﷺ and said: Upon you be peace, Messenger of Allah! He said: Do not say: Upon you be peace, for "Upon you be peace" is the salutation to the dead.
أَتَيْتُ النَّبِيَّ ﷺ فَقُلْتُ عَلَيْكَ السَّلاَمُ يَا رَسُولَ اللَّهِ قَالَ لاَ تَقُلْ عَلَيْكَ السَّلاَمُ فَإِنَّ عَلَيْكَ السَّلاَمُ تَحِيَّةُ الْمَوْتَى