صحيح البخاري Sahih Bukhari كتاب النكاح The Book of (The Wedlock)
بَابُ لاَ يَخْلُوَنَّ رَجُلٌ بِامْرَأَةٍ إِلاَّ ذُو مَحْرَمٍ، وَالدُّخُولُ عَلَى الْمُغِيبَةِ:

(112) Chapter. A man should not stay with a woman in seclusion unless he is a Dhu-Mahram (a person who is legally not allowed to marry that woman, e.g. her father or brother, etc.). (And it is unlawful for one) to enter upon a woman whose husband is absent.

2 hadith
Hadith 5232
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ ، حَدَّثَنَا لَيْثٌ ، عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ ، عَنْ أَبِي الْخَيْرِ ، عَنْ عُقْبَةَ بْنِ عَامِرٍ ، أَنّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " إِيَّاكُمْ وَالدُّخُولَ عَلَى النِّسَاءِ " ، فَقَالَ رَجُلٌ مِنْ الْأَنْصَارِ : يَا رَسُولَ اللَّهِ ، أَفَرَأَيْتَ الْحَمْوَ ؟ قَالَ : " الْحَمْوُ : الْمَوْتُ " .
Narrated `Uqba bin 'Amir: Allah's Apostle said, "Beware of entering upon the ladies." A man from the Ansar said, "Allah's Apostle! What about Al-Hamu the in-laws of the wife (the brothers of her husband or his nephews etc.)?" The Prophet replied: The in-laws of the wife are death itself.
Hadith Reference Sahih Bukhari / The Book of (The Wedlock) / Hadith: 5232
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 5233
حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ ، حَدَّثَنَا سُفْيَانُ ، حَدَّثَنَا عَمْرٌو ، عَنْ أَبِي مَعْبَدٍ ، عَنْ ابْنِ عَبَّاسٍ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " لَا يَخْلُوَنَّ رَجُلٌ بِامْرَأَةٍ إِلَّا مَعَ ذِي مَحْرَمٍ " ، فَقَامَ رَجُلٌ ، فَقَالَ : " يَا رَسُولَ اللَّهِ ، امْرَأَتِي خَرَجَتْ حَاجَّةً وَاكْتُتِبْتُ فِي غَزْوَةِ كَذَا وَكَذَا ، قَالَ : ارْجِعْ فَحُجَّ مَعَ امْرَأَتِكَ " .
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 Apostle! 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."
Hadith Reference Sahih Bukhari / The Book of (The Wedlock) / Hadith: 5233
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة