Hadith 1628
'Uqbah bin 'Amir (May Allah be pleased with him) said:
وعن عقبة بن عامر رضي الله عنه أن رسول الله صلى الله عليه وسلم قال: "إياكم والدخول على النساء"، فقال رجل من الأنصار: أفرأيت الحمو؟ قال: "الحمو الموت" ((متفق عليه)). الحمو قريب الزوج كأخيه، وابن أخيه، وابن عمه.
The Messenger of Allah (ﷺ) said, "Avoid (entering a place) in which are women (uncovered or simply to mix with them in seclusion)." A man from the Ansar said, "Tell me about the brother of a woman's husband." He replied, "The brother of a woman's husband is death." [Al- Bukhari and Muslim].
In plain words
Avoid being alone in seclusion with women you may not be alone with, and when asked about the husband's brother the Prophet (peace be upon him) called such closeness a danger. Familiarity is no excuse to drop these safeguards.
Reference : Riyad as-Salihin 1628 In-book reference : Book 17, Hadith 118