Sahl b. Sa'd said that a man looked through a hole in God’s Messenger’s door when God’s Messenger had a spike with which he was scratching his head, so he said, “If I knew that you were seeing me I would poke it in your eyes, for asking permission has been appointed only on account of what people may see.”
(Bukhari and Muslim.)