Abu Bakra reported,

The Messenger of Allah ﷺ said, "The sun and the moon are two of Allah's signs. They do not eclipse for anyone's death or life, but Allah Most High uses them to instill fear in His servants."Abu Abdullah said, Abd al-Warith, Shuba, Khalid bin Abdullah, and Hammad bin Salama, in their narrations from Yunus, did not mention the phrase "Allah uses them to instill fear in His servants."Ashath followed him, narrating from al-Hasan, and Musa also followed him, narrating from Mubarak, from al-Hasan, who said, Abu Bakra informed me from the Prophet ﷺ that Allah Most High uses these two to instill fear in His servants.

Bukhari 1048

Sahih

حدثنا قتيبة بن سعيد قال حدثنا حماد بن زيد عن يونس عن الحسن

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

قال رسول الله ﷺ إن الشمس والقمر آيتان من آيات الله لا ينكسفان لموت أحد ولا لحياته ولكن الله تعالى يخوف بها عباده و قال أبو عبد الله ولم يذكر عبد الوارث وشعبة وخالد بن عبد الله وحماد بن سلمة عن يونس يخوف الله بها عباده وتابعه أشعث عن الحسن وتابعه موسى عن مبارك عن الحسن قال أخبرني أبو بكرة عن النبي ﷺ إن الله تعالى يخوف بهما عباده

البخاري 1048صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Eclipse
Chapter
Prophet's ﷺ saying, "Allah frightens His slaves with the eclipse"
Numbering
Darussalam 1048
Bukhari 1048