[Machine] Narrated to me about the tashahhud of the Prophet Muhammad ﷺ in the middle and at the end of the prayer, Abdullah bin Mas'ood said: "The Messenger of Allah ﷺ taught me the tashahhud in the middle and at the end of the prayer, and we used to memorize it from Abdullah when he informed us that the Messenger of Allah ﷺ taught it to him." He said: "So he used to say when he sat in the middle and at the end of the prayer, leaning on his left leg: 'Greetings, prayers and good deeds are for Allah. Peace be upon you, O 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 His slave and Messenger.' Then if he was in the middle of the prayer, he would rise when he finished the tashahhud. And if he was at the end of the prayer, he would supplicate whatever Allah willed, and then he would say the salaam."
حَدَّثَنِي عَنْ تَشَهُّدِ رَسُولِ اللهِ ﷺ فِي وَسَطِ الصَّلَاةِ وَفِي آخِرِهَا عَبْدُ الرَّحْمَنِ بْنُ الْأَسْوَدِ بْنِ يَزِيدَ النَّخَعِيُّ عَنْ أَبِيهِ عَنْ عَبْدِ اللهِ بْنِ مَسْعُودٍ قَالَ عَلَّمَنِي رَسُولُ اللهِ ﷺ التَّشَهُّدَ فِي وَسَطِ الصَّلَاةِ وَفِي آخِرِهَا فَكُنَّا نَحْفَظُ عَنْ عَبْدِ اللهِ حِينَ أَخْبَرَنَا أَنَّ رَسُولَ اللهِ ﷺ عَلَّمَهُ إِيَّاهُ قَالَ فَكَانَ يَقُولُ إِذَا جَلَسَ فِي وَسَطِ الصَّلَاةِ وَفِي آخِرِهَا عَلَى وَرِكِهِ الْيُسْرَى التَّحِيَّاتُ لِلَّهِ وَالصَّلَوَاتُ وَالطَّيِّبَاتُ السَّلَامُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ السَّلَامُ عَلَيْنَا وَعَلَى عِبَادِ اللهِ الصَّالِحِينَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ قَالَ ثُمَّ إِنْ كَانَ فِي وَسَطِ الصَّلَاةِ نَهَضَ حِينَ يَفْرُغُ مِنْ تَشَهُّدِهِ وَإِنْ كَانَ فِي آخِرِهَا دَعَا بَعْدَ تَشَهُّدِهِ مَا شَاءَ اللهُ أَنْ يَدْعُوَ ثُمَّ يُسَلِّمَ