The Prophet ﷺ said, "The imam is appointed only to be followed. So when he says the takbir, say the takbir. When he bows, bow. When he says, 'Allah hears whoever praises Him,' say, 'Our Lord, to You belongs all praise.' And when he prays sitting, all of you pray sitting."
حدثنا عباد بن عباد المهلبي عن محمد بن عمرو عن أبي سلمة
عن النبي ﷺ أنه قال إنما الإمام ليؤتم به فإذا كبر فكبروا وإذا ركع فاركعوا وإذا قال سمع الله لمن حمده فقولوا ربنا لك الحمد فإذا صلى جالسا فصلوا جلوسا أجمعين
Its isnad is sahih. Abbad bin Abbad Muhallabi, his reliability was established earlier at 1791, and we add here that Ibn Abu Hatim gave his biography in Jarh wa Tadil 3/82-83, and Ibn Saad in Tabaqat 2/45, 71. Muhammad bin Amr is Muhammad bin Amr bin Alqama bin Waqqas Laythi, whose biography was given earlier at 1405. The hadith was narrated by the two Shaykhs and others. See Muntaqa 1375, and Tahzib Sunan by Mundhiri 574.