Sahih Muslim Book 007, Hadith Number 2744.
Chapter : Permissibility of washing the body and head for the Muhrim.
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.