Narrated Ibn `Abbas: The Prophet (ﷺ) said, "No man should stay with a lady in seclusion except in the presence of a Dhu- Muhram." A man stood up and said, "O Allah's Messenger (ﷺ)! My wife has gone out intending to perform the Hajj and I have been enrolled (in the army) for such-and-such campaign." The Prophet (ﷺ) said, "Return and perform the Hajj with your wife."
The chain is ordered from the source of the saying to the compiler: 1 = the speaker/first transmitter, the following links those who passed it on in turn, and at the bottom al-Bukhari who compiled the work. Click a narrator to list every hadith in which he appears; the number in parentheses is how many hadiths across the collections on this site the narrator appears in.