Salim Abu Nadr reported,

Abdullah bin Abu Awfa wrote to him when he set out against the Haruriyyah, and I read the letter. It contained the following.The Messenger of Allah ﷺ, on one of the days when he met the enemy, waited until the sun had passed its zenith. Then he stood among the people and said, "People, do not wish to meet the enemy, and ask Allah for well-being. But when you do meet them, be steadfast, and know that Paradise lies beneath the shade of swords."Then he said, "O Allah, Revealer of the Book, Mover of the clouds, Defeater of the confederates, defeat them and grant us victory over them."

Azami 7830

Sahih

عن سالم أبي النضر مولى عمر بن عبيد الله- وكان كاتبا له- قال

كتب إليه عبد الله بن أبي أوفى حين خرج إلى الحرورية فقرأته فإذا فيه: إن رسول الله ﷺ في بعض أيامه التي لقي فيها العدو، انتظر حتى مالت الشمس، ثم قام في الناس، فقال: أيها الناس لا تمنوا لقاء العدو، وسلوا الله العافية، فإذا لقيتموهم فاصبروا، واعلموا أن الجنة تحت ظلال السيوف، ثم قال: اللهم منزل الكتاب، ومجري السحاب، وهازم الأحزاب، اهزمهم، وانصرنا عليهم.

الأعظمي 7830صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Prohibition of wishing to meet the enemy
Numbering
Jami al-Kamil 7830 (2nd edition)
Azami 7830