Ata reported,

I heard Ubayd bin Umayr say, "Someone whom I trust told me, and I think he meant Ayesha, that the sun was eclipsed during the time of the Messenger of Allah ﷺ. He stood for a very long time. He would stand, then bow, then stand, then bow, then stand, then bow, performing two units of prayer in three bowings and four prostrations. By the time he finished, the sun had become clear again. Whenever he bowed, he would say, 'Allah is the greatest,' and then bow. When he raised his head, he would say, 'Allah hears whoever praises Him,' then he stood and praised Allah and extolled Him. Then he said, 'The sun and the moon do not eclipse for the death or the life of anyone, but they are two of the signs of Allah by which Allah strikes fear into His servants. So when you see an eclipse, remember Allah until they become clear again.'"

Azami 2986

Sahih

عن عطاء يقول

سمعت عبيد بن عمير يقول: حدثني من أصدق- حسبته يريد عائشة- أن الشمس انكسفت على عهد رسول الله ﷺ فقام قياما شديدا، يقوم قائما ثم يركع، ثم يقوم ثم يركع، ثم يقوم ثم يركع ركعتين في ثلاث ركعات وأربع سجدات، فانصرف، وقد تجلت الشمس، وكان إذا ركع قال: الله أكبر ثم يركع، وإذا رفع رأسه قال: سمع الله لمن حمده فقام فحمد الله، وأثنى عليه، ثم قال: إن الشمس والقمر لا يكسفان لموت أحد ولا لحياته، ولكنهما من آيات الله يخوف الله بهما عباده، فإذا رأيتم كسوفا فاذكروا الله حتى ينجليا.

الأعظمي 2986صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Eclipse prayer
Section
Eclipse prayer is six ruku in two rakahs
Numbering
Jami al-Kamil 2986 (2nd edition)
Azami 2986