Bahz b. Hakim, on his father’s authority, told that his grandfather reported God’s Messenger as saying, "Cover your private parts, except from your wife or your female slave,” and said he asked him to tell him what a man might do when alone. He replied, "God has most right to modesty from you.”
Jabir reported the Prophet as saying, "Do not visit women whose husbands are away from home, for the devil circulate in you like your blood.” He was asked if this applied to him also and said, "To me also, but God has helped me against him so that I may be safe.”
I was with God’s Messenger along with Maimuna when Ibn Umm Maktum approached and came in to visit him, so he told us to veil ourselves. I said, "Messenger of God, is he not blind and unable to see us?” He replied, "Are you blind and unable to see him?”