The Prophet ﷺ said, "If you say to your companion, 'Be quiet,' while the imam is delivering the sermon, you have engaged in idle talk."
حدثنا حسين حدثنا ابن أبي ذئب عن الزهري عن ابن المسيب
عن النبي ﷺ قال إذا قلت لصاحبك والإمام يخطب أنصت فقد لغوت
Its isnad is sahih. It has already appeared in 7672. Bukhari related something similar to it, 2/16, in the Book of Friday Prayer, the chapter on remaining silent on Friday. Similarly, Muslim related it, 1/583, no. 851, and Nasai, 3/188, no. 1577, in the Book of the Two Eids, the chapter on how the sermon is delivered, and Ibn Majah, 1/352, no. 1110.