We used to say during the prayer behind the Messenger of Allah ﷺ, "Peace be upon Allah, peace be upon so-and-so."One day the Messenger of Allah ﷺ said to us, "Allah Himself is peace. So when one of you sits during the prayer, let him 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.' For 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 supplication he wishes."
حدثنا زهير بن حرب وعثمان بن أبي شيبة وإسحق بن إبراهيم قال إسحق أخبرنا وقال الآخران حدثنا جرير عن منصور عن أبي وائل
كنا نقول في الصلاة خلف رسول الله ﷺ السلام على الله السلام على فلان فقال لنا رسول الله ﷺ ذات يوم إن الله هو السلام فإذا قعد أحدكم في الصلاة فليقل التحيات لله والصلوات والطيبات السلام عليك أيها النبي ورحمة الله وبركاته السلام علينا وعلى عباد الله الصالحين فإذا قالها أصابت كل عبد لله صالح في السماء والأرض أشهد أن لا إله إلا الله وأشهد أن محمدا عبده ورسوله ثم يتخير من المسألة ما شاء