Do we say al-salaamu ‘alayka ayyhu’l-nabiyyu or al-salaam ‘ala al-nabi in the tashahhud?
Question

                Is it correct that after the death of the Prophet (peace and blessings of Allaah be upon him) that if a person says in the tashahhud “al-salaamu ‘alayka ayyhu’l-nabiyyu (peace be upon you, O Prophet)” there is the fear that this may be shirk, and that we should say “al-salaam ‘ala al-nabi (peace be upon the Prophet)”?.
Praise be to Allah.
    The scholars of the Standing Committee were asked: 

    It was narrated that Ibn Mas’ood (may Allaah be pleased with 
    him) said: The Messenger of Allaah  (peace and blessings of Allaah be 
    upon him) taught me the tashahhud with my hand between his hands, just as he 
    taught me a soorah from the Qur’aan: “Al-tahiyyaatu Lillaahi 
    wa’l-salawaatu wa’l-tayyibaat al-salaamu ‘alayka ayyuha’l-nabiyyu… (All 
    compliments, prayers and good words are for Allaah, peace be upon you, O 
    Prophet…).” (That was) when he was still among us. When he passed away, we 
    started to say, “al-salaam ‘ala al-nabi (peace be upon the Prophet 
     (peace and blessings of Allaah be upon him)).” 

    Many people say the latter version and teach others to do 
    likewise. 

    They replied: 

    The version of the tashahhud that the Messenger of Allaah 
     (peace and blessings of Allaah be upon him) used to recite in his 
    prayer and that he commanded his companions to recite is that which was 
    narrated by the two Shaykhs (al-Bukhaari and Muslim) in their Saheehs 
    from ‘Abd-Allaah ibn Mas’ood (may Allaah be pleased with him) who said: The 
    Messenger of Allaah  (peace and blessings of Allaah be upon him) taught 
    me the tashahhud with my hand between his hands, just as he taught me a 
    soorah from the Qur’aan: “Al-tahiyyaatu Lillaahi wa’l-salawaatu 
    wa’l-tayyibaat, al-salaamu ‘alayka ayyuha’l-nabiyyu wa rahmat-Allaahi wa 
    barakaatuhu, al-salaamu ‘alayna wa ‘ala ‘ibaad-illaah il-saaliheen, ash-hadu 
    an laa ilaaha ill-Allaah wa ash-hadu anna Muhammadan ‘abduhu wa rasooluh… 
    (All compliments, prayers and good words are for Allaah, peace be upon you, 
    O Prophet, and the mercy of Allaah and His blessings, peace be upon us and 
    upon the righteous slaves of Allaah. I bear witness that there is no god 
    except Allaah and I bear witness that Muhammad is His slave and Messenger). 
    This is the more correct version, because the Prophet  (peace and 
    blessings of Allaah be upon him) taught it to his companions and he did not 
    say, When I die then say al-salaamu ‘ala al-nabi (peace be upon the 
    Prophet). 

    They were also asked: 

    In the tashahhud should we say “al-salaamu ‘alayka 
    ayyhu’l-nabiyyu (peace be upon you, O Prophet)” or “al-salaamu ‘ala 
    al-nabi (peace be upon the Prophet)” – because ‘Abd-Allaah ibn Mas’ood 
    (may Allaah be pleased with him) said: Before the Prophet  (peace and 
    blessings of Allaah be upon him) died we used to say “al-salaamu ‘alayka 
    ayyhu’l-nabiyyu (peace be upon you, O Prophet)” but after he died we 
    said “al-salaamu ‘ala al-nabi (peace be upon the Prophet)”? 

    They replied: 

    The  correct view is that in the tashahhud the worshipper 
    should say: “al-salaamu ‘alayka ayyuha’l-nabiyyu wa rahmat-Allaahi wa 
    barakaatuhu (peace be upon you, O Prophet, and the mercy of Allaah and 
    His blessings,), because this is what is proven in the ahaadeeth. With 
    regard to the report narrated from Ibn Mas’ood (may Allaah be pleased with 
    him) – if it is a saheeh (sound) narration from him – this is the ijtihaad 
    of the one who did that and it does not contradict the proven ahaadeeth. If 
    the ruling after the death of the Prophet  (peace and blessings of 
    Allaah be upon him) were different than the ruling when he was still alive, 
    he would have told us that. 

    Fataawa al-Lajnah al-Daa’imah li’l-Buhooth al-‘Ilmiyyah 
    wa’l-Ifta’, 7/11-13 
Shaykh Ibn ‘Uthaymeen 
    (may Allaah have mercy on him) has explained this issue very clearly, and 
    has refuted the specious argument of those who claim that the prescribed 
    version is in the nature of calling upon one who is absent. He said:  

    Are the words “al-salaamu ‘alayka (peace be upon you)” 
    a statement or a supplication? I.e., are you stating that the Prophet  
    (peace and blessings of Allaah be upon him) is in a state of peace or are 
    you asking Allaah to grant him peace? 

    The answer is that it is a du’aa’ (supplication) in which you 
    are praying to Allaah to send peace upon him. This is a statement which is 
    serving as a supplication. 

    Is this addressed to the Prophet  (peace and blessings of 
    Allaah be upon him) as people address one another? 

    The answer is No. If that were the case, it would invalidate 
    the prayer, because this prayer should not contain anything of human speech. 
    If that were the case, the Sahaabah would have spoken these words out loud 
    so that the Prophet  (peace and blessings of Allaah be upon him) could 
    hear them, and he would have returned the greeting to them as he used to do 
    when they met him. But as Shaykh al-Islam [Ibn Taymiyah] said in his book 
    Iqtida’ al-Siraat al-Mustaqeem: Because you are thinking of the 
    Messenger  (peace and blessings of Allaah be upon him) is so strong when 
    you send salaams upon him, it is as if he is there in front of you and you 
    are addressing him. 

    Hence the Sahaabah used to say “al-salaamu ‘alayka 
    (peace be upon you)”, but he did not hear them, and they would say, “al-salaamu 
    ‘alayka (peace be upon you)” when they were in another land. And we say 
    “al-salaamu ‘alayka (peace be upon you)” when we are in a land other 
    than his, and in a time other than his. 

    With regard to the report narrated in Saheeh al-Bukhaari 
    from ‘Abd-Allaah ibn Mas’ood, which says that after the Messenger  
    (peace and blessings of Allaah be upon him) passed away they used to say “al-salaamu 
    ‘ala al-nabi wa rahmat-Allaahi wa barakaatuhu (peace be upon the Prophet 
    and the mercy and blessings of Allaah)” – this was the ijtihaad of Ibn 
    Mas’ood (may Allaah be pleased with him), which differed from that of one 
    who was more knowledgeable than him, namely ‘Umar ibn al-Khattaab, for he 
    addressed the people from the minbar of the Messenger of Allaah  (peace 
    and blessings of Allaah be upon him) and said in the tashahhud: “al-salaamu 
    ‘alayka ayyhu’l-nabiyyu wa rahmat-Allaah (peace be upon you, O Prophet 
    and the mercy of Allaah)”, as was narrated by Maalik in al-Muwatta’ 
    with the soundest of isnaads. ‘Umar said this in the presence of the 
    Sahaabah and they approved of it. 

    Moreover the Messenger  (peace and blessings of Allaah be 
    upon him) taught it to his ummah, and he even taught it to Ibn Mas’ood, 
    holding his hand between his own, so that he would remember this wording. He 
    used to teach it to them as he used to teach them a soorah from the Qur’aan. 
    And he knew that he was going to die, because Allaah said to him 
    (interpretation of the meaning): 

    “Verily, you (O Muhammad) will die, and verily, they (too) 
    will die”

    [al-Zumar 39:30]
But he did not say: after I die, say “al-salaamu ‘ala 
    al-nabi (peace be upon the Prophet)”, rather he taught them the 
    tashahhud as he used to teach them a soorah of the Qur’aan, with this 
    wording. Hence we should not rely on the ijtihaad of Ibn Mas’ood, rather we 
    should say, “al-salaamu ‘alayka ayyhu’l-nabiyyu (peace be upon you, O 
    Prophet)”. 

    Al-Sharh al-Mumti’, 3/150-151 

    And Allaah knows best.