The Prophet ﷺ said: A man should not lie with another man and a woman should not lie with another woman without covering their private parts except a child or a father. He also mentioned a third thing which I forgot. (Using translation from Abū Dāʾūd 4019)
قَالَ رَسُولُ اللهِ ﷺ لَا يُفْضِيَنَّ رَجُلٌ إِلَى رَجُلٍ وَلَا امْرَأَةٌ إِلَى امْرَأَةٍ إِلَّا وَلَدٌ أَوْ وَالِدٌ قَالَ فَذَكَرَ الثَّالِثَةَ فَنَسِيتُهَا