Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:17897a
Request/Fix translation

  

السيوطي:١٧٨٩٧a

"لَوْ عَلِمْتُ أنَّكَ تَنْظُرُ لَطَعْنتُ بِها في عَينِكَ، إِنَّما جُعِلَ الاسْتِئْذَانُ مِن أجل البَصَرِ".  

[ط] الطيالسي [حم] أحمد [خ] البخاري [م] مسلم [د] أبو داود [ت] الترمذي [هـ] ابن ماجة عن سهل بن سعد

See similar narrations below:

Collected by Bukhārī, Tirmidhī, Ṭabarānī
bukhari:5924Ādam b. Abū Iyās > Ibn Abū Dhiʾb > al-Zuhrī > Sahl b. Saʿd

A man peeped into the house of the Prophet ﷺ through a hole while the Prophet ﷺ was scratching his head with a Midrai (a certain kind of comb). On that the Prophet ﷺ said (to him), "If I had known you had been looking, then I would have pierced your eye with that instrument, because the asking of permission has been ordained so that one would not see things unlawfully."  

البخاري:٥٩٢٤حَدَّثَنَا آدَمُ بْنُ أَبِي إِيَاسٍ حَدَّثَنَا ابْنُ أَبِي ذِئْبٍ عَنِ الزُّهْرِيِّ عَنْ سَهْلِ بْنِ سَعْدٍ

أَنَّ رَجُلاً اطَّلَعَ مِنْ جُحْرٍ فِي دَارِ النَّبِيِّ ﷺ وَالنَّبِيُّ ﷺ يَحُكُّ رَأْسَهُ بِالْمِدْرَى فَقَالَ لَوْ عَلِمْتُ أَنَّكَ تَنْظُرُ لَطَعَنْتُ بِهَا فِي عَيْنِكَ إِنَّمَا جُعِلَ الإِذْنُ مِنْ قِبَلِ الأَبْصَارِ  

tirmidhi:2709Ibn Abū ʿUmar > Sufyān > al-Zuhrī > Sahl b. Saʿd al-Sāʿidī

that a man peeked in on the Messenger of Allah ﷺ, in one of the apartments of the Prophet ﷺ, while the Prophet ﷺ had a Midrah (an iron comb) with which he was scratching his head. So the Prophet ﷺ said: "If I knew that you were looking then I would have poked your eyes with it. Seeking permission has only been enjoined because of the sight."  

Abū ʿĪsá said that this Ḥadīth is Ḥasan-Ṣaḥīḥ.
الترمذي:٢٧٠٩حَدَّثَنَا ابْنُ أَبِي عُمَرَ حَدَّثَنَا سُفْيَانُ عَنِ الزُّهْرِيِّ عَنْ سَهْلِ بْنِ سَعْدٍ السَّاعِدِيِّ

أَنَّ رَجُلاً اطَّلَعَ عَلَى رَسُولِ اللَّهِ ﷺ مِنْ جُحْرٍ فِي حُجْرَةِ النَّبِيِّ ﷺ وَمَعَ النَّبِيِّ ﷺ مِدْرَاةٌ يَحُكُّ بِهَا رَأْسَهُ فَقَالَ النَّبِيُّ ﷺ لَوْ عَلِمْتُ أَنَّكَ تَنْظُرُ لَطَعَنْتُ بِهَا فِي عَيْنِكَ إِنَّمَا جُعِلَ الاِسْتِئْذَانُ مِنْ أَجْلِ الْبَصَرِ وَفِي الْبَابِ عَنْ أَبِي هُرَيْرَةَ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ
tabarani:5665Abū Shuʿayb al-Ḥarrānī > Yaḥyá b. ʿAbdullāh al-Bābiltī > Ibn Abū Dhiʾb > al-Zuhrī > Sahl b. Saʿd

a man looked through a hole in the door of the Prophet, who had with him a kind of comb with which he was scratching his head, When the Messenger of Allah saw him he said: "If I had known that you were watching me, I would have stabbed you in the eye with this. This rule of asking permission has been ordained so that one may not look unlawfully (into people's houses). (Using translation from Nasāʾī 4859)   

الطبراني:٥٦٦٥حَدَّثَنَا أَبُو شُعَيْبٍ الْحَرَّانِيُّ ثنا يَحْيَى بْنُ عَبْدِ اللهِ الْبَابِلْتِيُّ ثنا ابْنُ أَبِي ذِئْبٍ عَنِ الزُّهْرِيِّ عَنْ سَهْلِ بْنِ سَعْدٍ

أَنَّ رَجُلًا اطَّلَعَ فِي جُحْرٍ فِي بَابِ رَسُولِ اللهِ ﷺ وَرَسُولُ اللهِ ﷺ يَحُكُّ رَأْسَهُ بِمِدْرًى فَقَالَ رَسُولُ اللهِ ﷺ «لَوْ عَلِمْتُ أَنَّكَ تَنْتَظِرُنِي لَطَعَنْتُ بِهِ فِي عَيْنِكَ إِنَّمَا جُعِلَ الِاسْتِئْذَانُ مِنْ أَجْلِ الْبَصَرِ»