Messenger of Allah ﷺ saw a person sitting aloof and not praying with the people. He asked him, "O so and so! What prevented you from offering the prayer with the people?" He replied, "O Messenger of Allah ﷺ! I am Junub and there is no water." The Prophet ﷺ said, "Perform Tayammum with clean earth and that will be sufficient for you." (Using translation from Bukhārī 348)
أَنَّ رَسُولَ اللهِ ﷺ رَأَى رَجُلًا مُعْتَزِلًا لَمْ يُصَلِّ فِي الْقَوْمِ فَقَالَ يَا فُلَانُ مَا مَنَعَكَ أَنْ تُصَلِّيَ فِي الْقَوْمِ؟ فَقَالَ يَا رَسُولَ اللهِ أَصَابَتْنِي جَنَابَةٌ وَلَا مَاءٌ فَقَالَ عَلَيْكَ بِالصَّعِيدِ فَإِنَّهُ يَكْفِيكَ