Sunan an-Nasa'i, Volume 2, Book 16, Hadith 1503 (DarusSalam) ⓘ
It was narrated that Abu Bakrah said: "We were with the Prophet and the sun became eclipsed. He got up and went to the masjid, dragging his garment in haste. The people stood with him and he prayed two rak'ahs as they usually prayed. When the eclipse ended he addressed us and said 'The sun and the moon are two of the signs of Allah (SWT), with which He strikes fear into His slaves. They do not become eclipsed for the death or birth of anyone. If you see either of them being eclipsed, then pray and supplicate until it removed it from you.'"
أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ، قَالَ حَدَّثَنَا يَزِيدُ، - وَهُوَ ابْنُ زُرَيْعٍ - قَالَ حَدَّثَنَا يُونُسُ، عَنِ الْحَسَنِ، عَنْ أَبِي بَكْرَةَ، قَالَ كُنَّا عِنْدَ النَّبِيِّ صلى الله عليه وسلم فَانْكَسَفَتِ الشَّمْسُ فَقَامَ إِلَى الْمَسْجِدِ يَجُرُّ رِدَاءَهُ مِنَ الْعَجَلَةِ فَقَامَ إِلَيْهِ النَّاسُ فَصَلَّى رَكْعَتَيْنِ كَمَا يُصَلُّونَ فَلَمَّا انْجَلَتْ خَطَبَنَا فَقَالَ " إِنَّ الشَّمْسَ وَالْقَمَرَ آيَتَانِ مِنْ آيَاتِ اللَّهِ يُخَوِّفُ بِهِمَا عِبَادَهُ وَإِنَّهُمَا لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ فَإِذَا رَأَيْتُمْ كُسُوفَ أَحَدِهِمَا فَصَلُّوا وَادْعُوا حَتَّى يَنْكَشِفَ مَا بِكُمْ " .
also referenced under: Hadith 1502 (Reference) & Book 16, Hadith 44 (In-Book)