Jabir reported Allah's Messenger (ﷺ) as saying
Behold, no person should spend the night with a married woman, but only in case he is married to her or he is her Mahram.
`Uqba b. `Amir reported Allah's Messenger (ﷺ) as saying
Beware of getting, into the houses and meeting women (in seclusion). A person from the Ansar said: Allah's Messenger, what about husband's brother, whereupon he (ﷺ) said: Husband's brother is like death.
This hadith has been narrated on the authority of Yazid b. Abu Habib with the same chain of transmitters.
Ibn Wahb reported
I heard Laith b. Said as saying : Al-Hamv means the brother of husband or like it from amongst the relatives of the husband , for example , cousin , etc.
'Abdullah b. 'Amr. b. al-'As reported that some persons from Banu Hisham entered the house of Asma' daughter of 'Umais when Abu Bakr also entered (and she was at that time his wife). He (Abu Bakr) saw it and disapproved of it and he made a mention of that to Allah's Messenger (ﷺ) and said
I did not see but good only (in my wife). Thereupon Allah's Messenger (ﷺ) said: Verily Allah has made her immune from all this. Then Allah's Messenger (ﷺ) stood on the pulpit and said: After this day no man should enter the house of another person in his absence, but only when he is accompanied by one person or two persons.