Abu Hurairah reported,

The Messenger of Allah ﷺ said, "The imam is but a shield. So when he prays sitting, pray sitting, and when he says, 'Allah hears whoever praises Him,' say, 'O Allah, our Lord, to You belongs all praise.' For when the words of the people of the earth coincide with the words of the people of heaven, his past sins are forgiven."

Muslim 934

Sahih

حدثنا محمد بن بشار حدثنا محمد بن جعفر حدثنا شعبة ح و حدثنا عبيد الله بن معاذ واللفظ له حدثنا أبي حدثنا شعبة عن يعلى وهو ابن عطاء سمع أبا علقمة سمع

أبا هريرة يقولا قال

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

مسلم 934صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Prayer
Chapter
Prohibition of preceding the imam in takbir and other matters
Numbering
Darussalam 934
Muslim 934