Sayyiduna Abu Shurayh al-Khuza'i (may Allah be pleased with him) narrates: In the blessed era of Sayyiduna Uthman Ghani (may Allah be pleased with him) the sun was eclipsed, and at that time Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) was also present in Madinah. The narrator says: Sayyiduna Uthman (may Allah be pleased with him) came out and led the people in prayer, in which he bowed twice in each rak'ah and prostrated twice. The narrator says: When Sayyiduna Uthman (may Allah be pleased with him) finished the prayer, he went into his house, while Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) sat down by the chamber of Sayyidah Aishah (may Allah be pleased with her), and we sat with him. He told us: The Prophet (peace and blessings be upon him) used to command that prayer be offered at the eclipse of the sun and the moon. When you see that they have been eclipsed, hasten to the prayer, for if this turns out to be what you fear, you will not be in a state of heedlessness, and if it does not turn out so, you will have attained good and earned it.
Ahmad, Abu Ya'la, al-Tabarani in al-Mu'jam al-Kabir and al-Bazzar recorded it, and its narrators have been declared trustworthy.