Language:
كتاب الأذان
10  
Call to Prayers (Adhaan)
(148)
Chapter: (Saying of the) Tashah-hud in the last Rak'a
(148)
باب التَّشَهُّدِ فِي الآخِرَةِ
Sahih al-Bukhari 831

Narrated Shaqiq bin Salama:

`Abdullah said, "Whenever we prayed behind the Prophet (ﷺ) we used to recite (in sitting) 'Peace be on Gabriel, Michael, peace be on so and so. Once Allah's Messenger (ﷺ) looked back at us and said, 'Allah Himself is As-Salam (Peace), and if anyone of you prays then he should say, at-Tahiyatu li l-lahi wa ssalawatu wa t-taiyibat. As-salamu `alalika aiyuha n-Nabiyu wa rahmatu l-lahi wa barakatuh. Assalamu `alaina wa `ala `ibadi l-lahi s-salihin. (All the compliments, prayers and good things are due to Allah; peace be on you, O Prophet, and Allah's mercy and blessings [be on you]. Peace be on us an on the pious subjects of Allah). (If you say that, it will reach all the subjects in the heaven and the earth). Ash-hadu al-la ilaha illa l-lah, wa ash-hadu anna Muhammadan `Abduhu wa Rasuluh. (I testify that there is no Deity [worthy of worship] but Allah, and I testify that Muhammad is His slave and His Apostle).

حَدَّثَنَا أَبُو نُعَيْمٍ، قَالَ حَدَّثَنَا الأَعْمَشُ، عَنْ شَقِيقِ بْنِ سَلَمَةَ، قَالَ قَالَ عَبْدُ اللَّهِ كُنَّا إِذَا صَلَّيْنَا خَلْفَ النَّبِيِّ صلى الله عليه وسلم قُلْنَا السَّلاَمُ عَلَى جِبْرِيلَ وَمِيكَائِيلَ، السَّلاَمُ عَلَى فُلاَنٍ وَفُلاَنٍ‏.‏ فَالْتَفَتَ إِلَيْنَا رَسُولُ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏ "‏ إِنَّ اللَّهَ هُوَ السَّلاَمُ، فَإِذَا صَلَّى أَحَدُكُمْ فَلْيَقُلِ التَّحِيَّاتُ لِلَّهِ، وَالصَّلَوَاتُ وَالطَّيِّبَاتُ، السَّلاَمُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ، السَّلاَمُ عَلَيْنَا وَعَلَى عِبَادِ اللَّهِ الصَّالِحِينَ‏.‏ فَإِنَّكُمْ إِذَا قُلْتُمُوهَا أَصَابَتْ كُلَّ عَبْدٍ لِلَّهِ صَالِحٍ فِي السَّمَاءِ وَالأَرْضِ، أَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ، وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 831
In-book reference : Book 10, Hadith 225
USC-MSA web (English) reference : Vol. 1, Book 12, Hadith 794
  (deprecated numbering scheme)