Hammam bin Munabbih reported,

This is what Abu Hurairah narrated to us from Muhammad, the Messenger of Allah ﷺ, mentioning several hadiths, among them:The Messenger of Allah ﷺ said, "The Children of Israil used to bathe naked, looking at one another's private parts, while Musa عليه السلام would bathe alone. They said, 'By Allah, nothing prevents Musa from bathing with us except that he has a hernia of the scrotum.'One day Musa went to bathe and placed his garment on a rock, but the rock ran off with his garment. Musa rushed after it, calling out, 'My garment, rock! My garment, rock!' until the Children of Israil caught sight of Musa's private parts and said, 'By Allah, there is nothing wrong with Musa.' Then the rock stopped, after Musa had been seen. He took his garment and began striking the rock."Abu Hurairah said, "By Allah, the rock bears six or seven marks from Musa's striking it."

Muslim 770

Sahih

و حدثنا محمد بن رافع حدثنا عبد الرزاق حدثنا معمر

عن همام بن منبه قال

هذا ما حدثنا أبو هريرة عن محمد رسول الله ﷺ فذكر أحاديث منها وقال رسول الله ﷺ كانت بنو إسرائيل يغتسلون عراة ينظر بعضهم إلى سوأة بعض وكان موسى عليه السلام يغتسل وحده فقالوا والله ما يمنع موسى أن يغتسل معنا إلا أنه آدر قال فذهب مرة يغتسل فوضع ثوبه على حجر ففر الحجر بثوبه قال فجمح موسى بإثره يقول ثوبي حجر ثوبي حجر حتى نظرت بنو إسرائيل إلى سوأة موسى قالوا والله ما بموسى من بأس فقام الحجر حتى نظر إليه قال فأخذ ثوبه فطفق بالحجر ضربا قال أبو هريرة والله إنه بالحجر ندب ستة أو سبعة ضرب موسى بالحجر

مسلم 770صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Menstruation
Chapter
Permissibility of bathing naked in seclusion
Numbering
Darussalam 770
Muslim 770