'Amr b. al-'As reported
When the sun eclipsed during the lifetime of the Messenger of Allah (ﷺ), they (the people) were called to congregational prayers. The Messenger of Allah (ﷺ) observed two ruku's in one rak'ah. He then stood and observed two ruku's in (the second) rak'ah. The sun then became bright, and 'A'isha said; Never did I observe, ruku' and prostration longer than this (ruku' and prostration).
Abu Mas'ud al-Ansari reported Allah's Messenger (ﷺ) as saying
Verily the sun and the moon are the two signs among the signs of Allah by which He frightens his servants and they do not eclipse on account of the death of any one of the people. So when you see anything about them, observe prayer, supplicate Allah till it is cleared from you.
Abu Mas'ud reported that the Messenger of Allah (ﷺ) said
Verily the sun and the moon do not eclipse on account of the death of any one of the people, but they are the two signs among the signs of Allah. So when you see it, stand up and observe prayer.
This hadith has been narrated on the authority of Isma'il with the same chain of transmitters and in the hadith narrated by Sufyan and Waki' (the words are)
" The sun eclipsed on the day when Ibrahim died, and the people said: It has eclipsed on the death of Ibrahim."
Abu Musa reported
The sun eclipsed during the time of the Messenger of Allah (ﷺ). He stood in great anxiety fearing that it might be the Doomsday, till he came to the mosque. He stood up to pray with prolonged qiyam, ruku', and prostration which I never saw him doing in prayer; and then he said: These are the signs which Allah sends, not on account of the death of anyone or life of any one, but Allah sends them to frighten thereby His servants. So when you see any such thing, hasten to remember Him, supplicate Him and beg pardon from Him, and in the narration transmitted by Ibn 'Ala the words are:" The sun eclipsed"."" He frightens His servants."
'Abd al-Rahman b. Samura said
During the lifetime of Allah's Messenger (ﷺ) I was shooting my arrows in Medina, when an eclipse of the sun took place. I, therefore, threw them away and said, I must see how the Messenger of Allah (ﷺ) acts in a solar eclipse today. When I came to him, he had been supplicating with his hands, raised, pronouncing Allah-o-Akbar, praising Him, acknowledging that He is One God till the eclipse was over, then he recited two surahs and prayed two rak'ahs.
'Abd al-Rahman b. Samura, who was one of the Companions of the Messenger of Allah (ﷺ) said
During the lifetime of Allah's Messenger (ﷺ) I was shooting some of my arrows in Medina, when the sun eclipsed. I threw (the arrows) and said: By Allah, I must see how the Messenger of Allah (ﷺ) acts in solar eclipse. So I came to him and he was standing in prayer, raising his hands, glorifying Him, praising Him, acknowledging His Oneness, declaring His greatness, and supplicating Him, till the sun cleared. When the eclipse was over, he recited two surahs and prayed two rak'ahs.
'Abd al-Rahman b. Samura reported
I was shooting some of my arrows during the lifetime of the Messenger of Allah (ﷺ) that the sun eclipsed. The rest of the hadith is the same.
'Abdullah b. 'Umar reported that the Messenger of Allah (ﷺ) observed
Verily the sun and the moon do not eclipse on account of the death or life of anyone. They are in fact the signs among the signs of Allah. So when you see them, observe prayer.
Ziyad b. 'Ilaqa reported
I heard Mughira b. Shu'ba saying that the sun eclipsed during the lifetime of the Messenger of Allah (ﷺ) on the day when Ibrahim died. Upon this the Messenger of Allah (ﷺ) said: Verily the sun and the moon are the two signs among the signs of Allah. They do not eclipse on account of the death of anyone or on account of the birth of anyone. So when you see them, supplicate Allah, and observe prayer till it is over.