Sahih Bukhari Volume 9, Book 93, Hadith Number 570.

Narrated By Ibn ‘Abbas : That he differed with Al-Hurr bin Qais bin Hisn Al-Fazari about the companion of Moses, (i.e., whether he was Kha,dir or not). Ubai bin Ka’b Al-Ansari passed by them and Ibn ‘Abbas called him saying, ‘My friend (Hur) and I have differed about Moses’ Companion whom Moses asked the way to meet. Did you hear Allah’s Apostle mentioning anything about him?” Ubai said, “Yes, I heard Allah’s Apostle saying, “While Moses was sitting in the company of some Israelites a man came to him and asked, ‘Do you know Someone who is more learned than you (Moses)?’ Moses said, ‘No.’ So Allah sent the Divine inspiration to Moses:

‘Yes, Our Slave Khadir is more learned than you’ Moses asked Allah how to meet him (Khadir) So Allah made the fish as a sign for him and it was said to him, ‘When you lose the fish, go back (to the place where you lose it) and you will meet him.’ So Moses went on looking for the sign of the fish in the sea. The boy servant of Moses (who was accompanying him) said to him, ‘Do you remember (what happened) when we betook ourselves to the rock? I did indeed forget to tell you (about) the fish. None but Satan made me forget to tell you about it’ (18.63) Moses said:

‘That is what we have been seeking.” Sa they went back retracing their footsteps. (18.64). So they both found Kadir (there) and then happened what Allah mentioned about them (in the Quran)!’ (See 18.60-82)