Abu Shurayh al-Khuza'i says: The sun was eclipsed in Madinah in the time of Sayyiduna Uthman (may Allah be pleased with him), and Abdullah bin Mas'ud (may Allah be pleased with him) was there. Sayyiduna Uthman (may Allah be pleased with him) came out and led the people in prayer, (performing) two bowings and two prostrations in each rak'ah. Then Sayyiduna Uthman (may Allah be pleased with him) left and entered his house, and Ibn Mas'ud (may Allah be pleased with him) sat by the apartment of Aishah (may Allah be pleased with her), and we sat with him. He said that the Messenger of Allah (peace and blessings be upon him) used to command prayer at the eclipse of the sun and the moon, and: "When you see that the eclipse has befallen the sun or the moon, hasten to the prayer. For if it is what you fear, that is, the Hour, you will not be found heedless; and if it is not, then you will have attained good," or he said: "you will have earned good."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الخسوف / 6316