The Messenger of Allah ﷺ used to teach us tashahhud just as he used to teach us a Surah of the Qur'an, and he would say: All services rendered by words, acts of worship, and all good things are due to Allah. Peace be upon you, O Prophet, and Allah's mercy and blessings. Peace be upon us and upon Allah's upright servants. I testify that there is no god but Allah, and I testify that Muhammad is the Messenger of Allah. In the narration of Ibn Rumh (the words are): "As he would teach us the Qur'an."
أَنَّهُ قَالَ كَانَ رَسُولُ اللَّهِ ﷺ يُعَلِّمُنَا التَّشَهُّدَ كَمَا يُعَلِّمُنَا السُّورَةَ مِنَ الْقُرْآنِ فَكَانَ يَقُولُ التَّحِيَّاتُ الْمُبَارَكَاتُ الصَّلَوَاتُ الطَّيِّبَاتُ لِلَّهِ السَّلاَمُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ السَّلاَمُ عَلَيْنَا وَعَلَى عِبَادِ اللَّهِ الصَّالِحِينَ أَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا رَسُولُ اللَّهِ وَفِي رِوَايَةِ ابْنِ رُمْحٍ كَمَا يُعَلِّمُنَا الْقُرْآنَ