Abu Hurairah reported,

A man came to the Messenger of Allah ﷺ and said, "Direct me to a deed that equals jihad."He replied, "I do not find one."Then he asked, "Are you able, when the warrior sets out, to enter your mosque and stand in prayer without rest, and to fast without breaking your fast?"The man said, "Who could do that?"Abu Hurairah said, "Indeed, the warrior's horse prancing about on its tether earns him good deeds recorded in his favor."

Bukhari 2785

Sahih

حدثنا إسحاق بن منصور أخبرنا عفان حدثنا همام حدثنا محمد بن جحادة قال أخبرني أبو حصين أن ذكوان حدثه أن

أبا هريرة رضي الله عنه حدثه قال

جاء رجل إلى رسول الله ﷺ فقال دلني على عمل يعدل الجهاد قال لا أجده قال هل تستطيع إذا خرج المجاهد أن تدخل مسجدك فتقوم ولا تفتر وتصوم ولا تفطر قال ومن يستطيع ذلك قال أبو هريرة إن فرس المجاهد ليستن في طوله فيكتب له حسنات

البخاري 2785صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
Virtue of jihad and military expeditions
Numbering
Darussalam 2785
Bukhari 2785