Alqama took me by the hand and told me that Abdullah bin Masud took him by the hand, and that the Messenger of Allah ﷺ took Abdullah by the hand and taught him the tashahhud to be recited in prayer.He said, "Say, 'All greetings, prayers, and good things belong 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.'"Zuhayr said, "I memorized from him, Allah willing, 'I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and messenger.'"He said, "When you have completed this," or he said, "When you have done this, you have completed your prayer. If you wish to stand, then stand, and if you wish to remain seated, then remain seated."
حدثنا يحيى بن آدم حدثنا زهير حدثنا الحسن بن الحر قال
أخذ علقمة بيدي وحدثني أن عبد الله بن مسعود أخذ بيده وأن رسول الله ﷺ أخذ بيد عبد الله فعلمه التشهد في الصلاة قال قل التحيات لله والصلوات والطيبات السلام عليك أيها النبي ورحمة الله وبركاته السلام علينا وعلى عباد الله الصالحين قال زهير حفظت عنه إن شاء الله أشهد أن لا إله إلا الله وأشهد أن محمدا عبده ورسوله قال فإذا قضيت هذا أو قال فإذا فعلت هذا فقد قضيت صلاتك إن شئت أن تقوم فقم وإن شئت أن تقعد فاقعد
Its chain is sahih. The hadith of Ibn Masud on the tashahhud has already appeared several times, most recently at 3935 and 3967. See also 4017.