The Messenger of Allah ﷺ saw a man bathing out in the open. He ascended the pulpit, praised Allah and glorified Him, and said, "Indeed Allah is Forbearing, Modest, and Concealing. He loves modesty and concealment. So when one of you bathes, let him cover himself."
أخبرني إبراهيم بن يعقوب قال حدثنا النفيلي قال حدثنا زهير قال حدثنا عبد الملك عن عطاء
أن رسول الله ﷺ رأى رجلا يغتسل بالبراز فصعد المنبر فحمد الله وأثنى عليه وقال إن الله عز وجل حليم حيي ستير يحب الحياء والستر فإذا اغتسل أحدكم فليستتر
[sahih] Recorded by Abu Dawud, "Bath, chapter on the prohibition of nudity," no. 4012, from Abdullah bin Muhammad bin Nufayl Nufayli, with this chain. Ata bin Abu Rabah heard it from Safwan bin Yaala, see the following hadith.