Hadithcore
Sunan Ibn Majah, 960
sahih· Darussalam

It was narrated that Abu Hurairah said:

“The Prophet (ﷺ) used to teach us not to bow or prostrate before the Imam; when he says the Takbir then say the Takbir, and when he prostrates, you should prostrate.”

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدٍ، عَنِ الأَعْمَشِ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ كَانَ النَّبِيُّ ـ صلى الله عليه وسلم ـ يُعَلِّمُنَا أَنْ لاَ نُبَادِرَ الإِمَامَ بِالرُّكُوعِ وَالسُّجُودِ وَإِذَا كَبَّرَ فَكَبِّرُوا وَإِذَا سَجَدَ فَاسْجُدُوا ‏.‏

References2 variants
In-Book Reference
Book 5, Hadith 158
English Reference
Vol. 1, Book 5, Hadith 960