It is narrated from Sayyiduna Sahl bin Sa'd (may Allah be pleased with him) that a man peeped through a hole at the Prophet (peace and blessings be upon him), while the Messenger of Allah (peace and blessings be upon him) had a comb with which he was scratching his head. So he (peace and blessings be upon him) said: "Had I known that you were peeping, I would have stood up and thrust this into your eye. Seeking permission has only been prescribed because of the sight."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 5648