Sahih Muslim | Book 7 | Chapter 12

Narrated by Ibrahim b. 'Abdullah
Ibrahim b. 'Abdullah narrated on the authority of his father that there cropped up a difference of opinion between Abdullah b. 'Abbas and al-Miswar b. Makhrama at a place (called) Abwa'. Abdullah b. 'Abbas contended that a Muhrim (is permitted) to wash his head, whereas Miswar contended that a Muhrim is not (permitted) to wash his head. So Ibn Abbas sent me (the father of Ibrabam) to Abu Ayyub al-Ansari to ask him about it. (So I went to him) and found him taking bath behind two poles covered by a cloth. I gave him salutation, whereupon be asked: Who is this? I said: I am 'Abdullah b. Hunain. 'Abdullah b. 'Abbas has sent me to you to find out how the Messenger of Allah (may peace be upon him) washed his head in the state of Ihram. Abu Ayyub (Allah be pleased with him) placed his hand on the cloth and lowered it (a little) till his head became visible to me; and he said to the man who was pouring water upon him to pour water. He poured water on his head. He then moved his head with the help of his hands and moved them (the hands) forward and backward and then said: This is how I saw him (the Messenger of Allah) doing.

Narrated by Zaid b. Aslam
This hadith has been narrated on the authority of Zaid b. Aslam with the same chain of transmitters that Abu Ayyub rubbed his whole head with his hands and then moved them forward and backward. Miswar said to Ibn 'Abbas: I would never dispute with you (in future).