Abdullah bin Abbas reported,

I heard the Prophet ﷺ saying in a sermon, "No man should be alone with a woman unless a Muharram relative of hers is present, and a woman must not travel except with a Muharram relative."A man stood up and said, "Messenger of Allah, my wife has set out for Hajj, and I have been enlisted for such-and-such military expedition."He replied, "Go and perform Hajj with your wife."

Azami 6429

Sahih

عن ابن عباس قال

سمعت النبي ﷺ يخطب يقول: لا يخلون رجل بامرأة إلا ومعها ذو محرم، ولا تسافر المرأة إلا مع ذي محرم. فقام رجل فقال: يا رسول الله، إن امرأتي خرجت حاجة، وإني اكتتبت في غزوة كذا وكذا. قال: انطلق فحج مع امرأتك

الأعظمي 6429صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Rights and duties of the Muslim woman, and good treatment of her
Section
Prohibition of seclusion with a non-mahram woman
Numbering
Jami al-Kamil 6429 (2nd edition)
Azami 6429