The sun was eclipsed during the lifetime of the Messenger of Allah ﷺ, so the Messenger of Allah ﷺ went out to the mosque. He stood, said the takbeer, and the people lined up in rows behind him. The Messenger of Allah ﷺ then recited a long recitation, said the takbeer, and bowed for a long time. He then raised his head and said, "Allah hears whoever praises Him. Our Lord, to You belongs all praise."Then he stood and recited another long recitation, shorter than the first, said the takbeer, and bowed for a long time, but shorter than the first bowing. He then said, "Allah hears whoever praises Him. Our Lord, to You belongs all praise."He did the same in the second rakah, completing four bowings and four prostrations. The sun became clear again before he finished.
حدثنا ابن السرح أخبرنا ابن وهب ح و حدثنا محمد بن سلمة المرادي حدثنا ابن وهب عن يونس عن ابن شهاب أخبرني عروة بن الزبير
خسفت الشمس في حياة رسول الله ﷺ فخرج رسول الله ﷺ إلى المسجد فقام فكبر وصف الناس وراءه فاقترأ رسول الله ﷺ قراءة طويلة ثم كبر فركع ركوعا طويلا ثم رفع رأسه فقال سمع الله لمن حمده ربنا ولك الحمد ثم قام فاقترأ قراءة طويلة هي أدنى من القراءة الأولى ثم كبر فركع ركوعا طويلا هو أدنى من الركوع الأول ثم قال سمع الله لمن حمده ربنا ولك الحمد ثم فعل في الركعة الأخرى مثل ذلك فاستكمل أربع ركعات وأربع سجدات وانجلت الشمس قبل أن ينصرف
Muslim narrated it in the Book of Eclipse Prayer, chapter on the eclipse prayer, hadith no. 901, through Abdullah bin Wahb, and Bukhari narrated it in the Book of Eclipse Prayer, chapter on the imam's sermon during the eclipse, hadith no. 1046, through Yunus bin Yazid Ayli, with the same wording.