Abdullah bin Abu Awfa wrote to him, and I read the letter, which said that the Messenger of Allah ﷺ said, "Do not wish to meet the enemy, and ask Allah for well-being."
كتب إليه عبد الله بن أبي أوفى فقرأته، فإذا فيه: أن رسول الله ﷺ قال: لا تتمنوا لقاء العدو، وسلوا الله العافية.
Bukhari narrated it in "Wishing" (7237), and Muslim in Jihad and Expeditions (1742:20), both through Musa bin Uqba, from Salim Abu Nadr, the freed slave of Umar bin Ubaydullah, who related it. The wording given here is Bukhari's, and it is recorded in full in Jihad.