The Messenger of Allah ﷺ addressed us and explained to us our way, and taught us our prayer. He said, "When you reach the sitting position, let the first words of each of you be, 'Greetings, good things, and prayers 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. I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and messenger.'"
إن رسول الله ﷺ خطبنا فبين لنا سنتنا، وعلمنا صلاتنا فقال: وإذا كان عند القعدة فليكن من أول قول أحدكم: التحيات الطيبات الصلوات لله، السلام عليك أيها النبي ورحمة الله وبركاته، السلام علينا وعلى عباد الله الصالحين، أشهد أن لا إله إلا الله وأشهد أن محمدا عبده ورسوله.
Muslim narrated it in the Book of Prayer (404) from the hadith of Hittan bin Abdullah Raqashi, who said, "I prayed with Abu Musa Ashari a prayer," then he mentioned a long hadith which includes the portion mentioned.