Bahz bin Hakim narrates from his father, from his grandfather (may Allah be pleased with him), who said: I said: O Messenger of Allah (peace and blessings be upon him)! Regarding our private parts, what may we expose and what must we cover? He (peace and blessings be upon him) said: "Guard your private parts except from your wife and your slave woman." I said: What do you think if we are among one another? He said: "If you are able to ensure that no one sees it, then let no one see it." Then I said: What if one of us is alone? He (peace and blessings be upon him) said: "Allah Almighty is more deserving than people that one should feel shy before Him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13538