The Messenger of Allah ﷺ forbade to enter the hot baths. He then permitted men to enter them in lower garments. (Using translation from Abū Dāʾūd 4009)
رَسُولَ اللهِ ﷺ نَهَى عَنْ دُخُولِ الْحَمَّامَاتِ ثُمَّ رَخَّصَ لِلرِّجَالِ أَنْ يَدْخُلُوهَا فِي الْمَيَازِرِ