Sunan Ibn Majah, Book 5, Hadith 158 (Ibn Majah 960)
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.”