Mishkat al-Masabih 527
وَعَن عمرَان بن حُصَيْن الْخُزَاعِيِّ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: رأى رجلا مُعْتَزِلا لم يصل فِي الْقَوْم فَقَالَ: «يَا فلَان مَا مَنعك أَن تصلي فِي الْقَوْم فَقَالَ يَا رَسُول الله أَصَابَتْنِي جَنَابَةٌ وَلَا مَاءَ قَالَ عَلَيْكَ بِالصَّعِيدِ فَإِنَّهُ يَكْفِيك»
From ʿImran ibn Husayn al-Khuzaʿi, that the Messenger of Allah ﷺ saw a man keeping apart, who had not prayed with the people. He said: "O so-and-so, what prevented you from praying with the people?" He said: "O Messenger of Allah, I am in a state of janabah and there is no water." He said: "Use clean earth, for it suffices you."