The Messenger of Allah ﷺ used to teach us the tashahhud just as he taught us the Quran. He would say, "The blessed greetings, the good prayers belong to Allah. Peace be upon you," Hujayn said, "peace be upon you, Prophet, and the mercy of Allah and His blessings. Peace be upon us and upon the righteous servants of Allah. I bear witness that there is no god but Allah, and that Muhammad is the Messenger of Allah."
حدثني يونس وحجين قالا حدثنا ليث بن سعد عن أبي الزبير عن سعيد بن جبير وطاوس
كان رسول الله ﷺ يعلمنا التشهد كما يعلمنا القرآن فكان يقول التحيات المباركات الصلوات الطيبات لله السلام عليك قال حجين سلام عليك أيها النبي ورحمة الله وبركاته السلام علينا وعلى عباد الله الصالحين وأشهد أن لا إله إلا الله وأن محمدا رسول الله
Its chain of transmission is sahih. Shafii related it in Al-Risalah 743, in our edition, from the trustworthy narrator, who is Yahya bin Hassan, from Layth bin Saad. Shafii said in Ikhtilaf al-Hadith [p. 63], "We adopted the tashahhud narrated from Ibn Abbas because it is the most complete of them, and it contains an addition not found in some of the others, the word 'blessed.'" The hadith was related by the authors of the six books except Bukhari. See Al-Muntaqa 998–1003.