Abdullah bin Masud reported,

We did not know what to say at the end of every two units of prayer, other than to glorify, magnify, and praise our Lord, until Muhammad ﷺ was taught the openings and closings of all goodness. He said, "When you sit at the end of every two units of prayer, say, 'All greetings belong to Allah, and all prayers and pure deeds. 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 His servant and His messenger.' Then let each of you choose whichever supplication he likes best and call upon Allah عز وجل with it."

Azami 2149

Sahih

عن عبد الله بن مسعود قال

كنا لا ندري ما نقول في كل ركعتين، غير أن نسبح ونكبر ونحمد ربنا، وأن محمدا ﷺ علم فواتح الخير وخواتمه، فقال: إذا قعدتم في كل ركعتين فقولوا: التحيات الله، والصلوات، والطيبات السلام عليك أيها النبي ورحمة الله وبركاته، السلام علينا وعلى عباد الله الصالحين، أشهد أن لا إله إلا الله، وأشهد أن محمدا عبده ورسوله، وليتخير أحدكم من الدعاء أعجبه إليه، فليدع الله عز وجل.

الأعظمي 2149صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Tashahhud and salam
Section
Whoever said the first tashahhud is obligatory
Numbering
Jami al-Kamil 2149 (2nd edition)
Azami 2149