Abu Bakra reported,

We were with the Messenger of Allah ﷺ when the sun was eclipsed. The Prophet ﷺ rose, dragging his cloak, until he entered the mosque. We entered with him, and he led us in two units of prayer until the sun became clear again.Then the Messenger of Allah ﷺ said, "The sun and the moon are not eclipsed for anyone's death. When you see them eclipsed, pray and supplicate until what afflicts you is removed."

Azami 2983

Sahih

عن أبي بكرة قال

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

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