Language:

Narrated Ibn Mas`ud:

Allah's Messenger (ﷺ) taught me the Tashah-hud as he taught me a Sura from the Qur'an, while my hand was between his hands. (Tashah-hud was) all the best compliments and the prayers and the good things are for Allah. Peace and Allah's Mercy and Blessings be on you, O Prophet! Peace be on us and on the pious slaves of Allah, I testify that none has the right to be worshipped but Allah, and I also testify that Muhammad is Allah's slave and His Apostle. (We used to recite this in the prayer) during the lifetime of the Prophet (ﷺ) , but when he had died, we used to say, "Peace be on the Prophet."

حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا سَيْفٌ، قَالَ سَمِعْتُ مُجَاهِدًا، يَقُولُ حَدَّثَنِي عَبْدُ اللَّهِ بْنُ سَخْبَرَةَ أَبُو مَعْمَرٍ، قَالَ سَمِعْتُ ابْنَ مَسْعُودٍ، يَقُولُ عَلَّمَنِي رَسُولُ اللَّهِ صلى الله عليه وسلم وَكَفِّي بَيْنَ كَفَّيْهِ التَّشَهُّدَ، كَمَا يُعَلِّمُنِي السُّورَةَ مِنَ الْقُرْآنِ التَّحِيَّاتُ لِلَّهِ وَالصَّلَوَاتُ وَالطَّيِّبَاتُ، السَّلاَمُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ، السَّلاَمُ عَلَيْنَا وَعَلَى عِبَادِ اللَّهِ الصَّالِحِينَ، أَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ‏.‏ وَهْوَ بَيْنَ ظَهْرَانَيْنَا، فَلَمَّا قُبِضَ قُلْنَا السَّلاَمُ‏.‏ يَعْنِي عَلَى النَّبِيِّ صلى الله عليه وسلم‏.‏
Reference : Sahih al-Bukhari 6265
In-book reference : Book 79, Hadith 39
USC-MSA web (English) reference : Vol. 8, Book 74, Hadith 281
  (deprecated numbering scheme)