The Messenger of Allah ﷺ used to teach us the tashahhud just as he would teach us the Quran. He would say, "All blessed greetings, prayers, and good words are due to Allah. 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 I bear witness that Muhammad is the Messenger of Allah."
حدثنا قتيبة حدثنا الليث عن أبي الزبير عن سعيد بن جبير وطاوس
كان رسول الله ﷺ يعلمنا التشهد كما يعلمنا القرآن فكان يقول التحيات المباركات الصلوات الطيبات لله سلام عليك أيها النبي ورحمة الله وبركاته سلام علينا وعلى عباد الله الصالحين أشهد أن لا إله إلا الله وأشهد أن محمدا رسول الله
Muslim also recorded it in the Book of Prayer, Chapter on the tashahhud in prayer, hadith no. 403, from Qutayba, through this same chain.