كتاب الصلاة
4  
The Book of Prayers
(20)
Chapter: The Prohibition Of Preceding The Imam In Saying The Takbir Or Anything Else
(20)
باب النَّهْىِ عَنْ مُبَادَرَةِ الإِمَامِ، بِالتَّكْبِيرِ وَغَيْرِهِ ‏
Sahih Muslim 416

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: Verily the Imam is a shield, say prayer sitting when he says prayer sitting. And when he says:" Allah listens to him who praises Him," say:" O Allah, our Lord, to Thee be the praise." and when the utterance of the people of the earth synchronises with that of the beings of heaven (angels), all the previous sins would be pardoned.
حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، ح وَحَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ، - وَاللَّفْظُ لَهُ - حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، عَنْ يَعْلَى، - وَهُوَ ابْنُ عَطَاءٍ - سَمِعَ أَبَا عَلْقَمَةَ، سَمِعَ أَبَا هُرَيْرَةَ، يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنَّمَا الإِمَامُ جُنَّةٌ فَإِذَا صَلَّى قَاعِدًا فَصَلُّوا قُعُودًا وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ‏.‏ فَقُولُوا اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ ‏.‏ فَإِذَا وَافَقَ قَوْلُ أَهْلِ الأَرْضِ قَوْلَ أَهْلِ السَّمَاءِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 416
In-book reference : Book 4, Hadith 96
USC-MSA web (English) reference : Book 4, Hadith 830
  (deprecated numbering scheme)