Language:
كتاب الغسل
5  
Bathing (Ghusl)
(8)
Chapter: The rubbing of hands with earth in ore to clean them thoroughly
(8)
باب مَسْحِ الْيَدِ بِالتُّرَابِ لِيَكُونَ أَنْقَى
Sahih al-Bukhari 260

Narrated Maimuna:

The Prophet (ﷺ) took the bath of Janaba. (sexual relation or wet dream). He first cleaned his private parts with his hand, and then rubbed it (that hand) on the wall (earth) and washed it. Then he performed ablution like that for the prayer, and after the bath he washed his feet.

حَدَّثَنَا الْحُمَيْدِيُّ، قَالَ حَدَّثَنَا سُفْيَانُ، قَالَ حَدَّثَنَا الأَعْمَشُ، عَنْ سَالِمِ بْنِ أَبِي الْجَعْدِ، عَنْ كُرَيْبٍ، عَنِ ابْنِ عَبَّاسٍ، عَنْ مَيْمُونَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم اغْتَسَلَ مِنَ الْجَنَابَةِ، فَغَسَلَ فَرْجَهُ بِيَدِهِ، ثُمَّ دَلَكَ بِهَا الْحَائِطَ ثُمَّ غَسَلَهَا، ثُمَّ تَوَضَّأَ وُضُوءَهُ لِلصَّلاَةِ، فَلَمَّا فَرَغَ مِنْ غُسْلِهِ غَسَلَ رِجْلَيْهِ‏.‏
Reference : Sahih al-Bukhari 260
In-book reference : Book 5, Hadith 13
USC-MSA web (English) reference : Vol. 1, Book 5, Hadith 260
  (deprecated numbering scheme)