كتاب الحيض
3  
The Book of Menstruation
(18)
Chapter: It is permissible to bathe naked when one is alone
(18)
باب جَوَازِ الاِغْتِسَالِ عُرْيَانًا فِي الْخَلْوَةِ ‏
Sahih Muslim 339

Amongst the traditions narrated from Muhammad, the Messenger of Allah (ﷺ) on the authority of Abu Huraira, the one is that Banu Isra'il used to take a bath naked, and they looked at the private parts of one another. Moses (peace be upon him), however, took a bath alone (in privacy) ; and they said (tauntingly):

By Allah, nothing prohibits Moses to take a bath along with us, but sacrotal hernia. He (Moses) once went for a bath and placed his clothes on a stone and the stone moved on with his clothes. Moses ran after it saying: 0 stone, my clothes,0 stone, my clothes, and Banu Isra'il had the chance to see the private parts of Moses, and said: By Allah, Moses does not suffer from any ailment. The stone then stopped, till Moses had been seen by them, and he then took hold of his clothes and struck the stone. Abu Huraira said: By Allah, there are the marks of six or seven strokes made by Moses on the stone.
وَحَدَّثَنَا مُحَمَّدُ بْنُ رَافِعٍ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، حَدَّثَنَا مَعْمَرٌ، عَنْ هَمَّامِ بْنِ مُنَبِّهٍ، قَالَ هَذَا مَا حَدَّثَنَا أَبُو هُرَيْرَةَ، عَنْ مُحَمَّدٍ، رَسُولِ اللَّهِ صلى الله عليه وسلم فَذَكَرَ أَحَادِيثَ مِنْهَا وَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ كَانَتْ بَنُو إِسْرَائِيلَ يَغْتَسِلُونَ عُرَاةً يَنْظُرُ بَعْضُهُمْ إِلَى سَوْأَةِ بَعْضٍ وَكَانَ مُوسَى - عَلَيْهِ السَّلاَمُ - يَغْتَسِلُ وَحْدَهُ فَقَالُوا وَاللَّهِ مَا يَمْنَعُ مُوسَى أَنْ يَغْتَسِلَ مَعَنَا إِلاَّ أَنَّهُ آدَرُ - قَالَ - فَذَهَبَ مَرَّةً يَغْتَسِلُ فَوَضَعَ ثَوْبَهُ عَلَى حَجَرٍ فَفَرَّ الْحَجَرُ بِثَوْبِهِ - قَالَ - فَجَمَحَ مُوسَى بِإِثْرِهِ يَقُولُ ثَوْبِي حَجَرُ ثَوْبِي حَجَرُ ‏.‏ حَتَّى نَظَرَتْ بَنُو إِسْرَائِيلَ إِلَى سَوْأَةِ مُوسَى قَالُوا وَاللَّهِ مَا بِمُوسَى مِنْ بَأْسٍ ‏.‏ فَقَامَ الْحَجَرُ حَتَّى نُظِرَ إِلَيْهِ - قَالَ - فَأَخَذَ ثَوْبَهُ فَطَفِقَ بِالْحَجَرِ ضَرْبًا ‏"‏ ‏.‏ قَالَ أَبُو هُرَيْرَةَ وَاللَّهِ إِنَّهُ بِالْحَجَرِ نَدَبٌ سِتَّةٌ أَوْ سَبْعَةٌ ضَرْبُ مُوسَى بِالْحَجَرِ ‏.‏
Reference : Sahih Muslim 339
In-book reference : Book 3, Hadith 92
USC-MSA web (English) reference : Book 3, Hadith 669
  (deprecated numbering scheme)