Abdullah bin Masud reported,

We used to say during the prayer, "Peace be upon Allah, peace be upon so-and-so." One day the Prophet ﷺ said to us, "Allah Himself is Peace. When one of you sits during the prayer, let him say, 'All greetings, prayers, and good things are for 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.' When he says this, it reaches every righteous servant of Allah in the heavens and the earth. 'I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and Messenger.' Then let him choose whatever words of praise he wishes."

Bukhari 6328

Sahih

حدثنا عثمان بن أبي شيبة حدثنا جرير عن منصور عن أبي وائل

عن عبد الله رضي الله عنه قال

كنا نقول في الصلاة السلام على الله السلام على فلان فقال لنا النبي ﷺ ذات يوم إن الله هو السلام فإذا قعد أحدكم في الصلاة فليقل التحيات لله إلى قوله الصالحين فإذا قالها أصاب كل عبد لله في السماء والأرض صالح أشهد أن لا إله إلا الله وأشهد أن محمدا عبده ورسوله ثم يتخير من الثناء ما شاء

البخاري 6328صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Supplications
Chapter
Supplication in prayer
Numbering
Darussalam 6328
Bukhari 6328