Hadith 17:928
Abu Bakr narrated to us, he said: Sufyan ibn ‘Uyaynah narrated to us, from al-Zuhri, who heard Sahl ibn Sa‘d saying: A man peeked through a hole in the chamber of the Prophet, may Allah bless him and grant him peace, and he had with him a comb (or a metal tool) with which he was scratching his head. He (the Prophet) said: "If I knew that you were looking, I would have thrust it into your eye. Indeed, seeking permission is for the sake of the sight."
حدثنا أبو بكر قال حدثنا سفيان بن عيينة عن الزهري سمع سهل بن سعد يقول اطلع رجل من جحر في حجرة النبي صلى الله عليه وسلم ومعه مدرى يحك به رأسه فقال لو أعلم أنك تنظر لطعنت به في عينك إنما الاستئذان من البصر