He sought permission to enter upon the Prophet ﷺ while he was in a house and said, "Shall I come in?"The Prophet ﷺ said to his servant, "Go out to this man and teach him how to seek permission. Tell him to say, 'Peace be upon you, may I enter?'"The man overheard him and said, "Peace be upon you, may I enter?"The Prophet ﷺ then granted him permission, and he entered.
حدثنا أبو بكر بن أبي شيبة حدثنا أبو الأحوص عن منصور عن ربعي قال
أنه استأذن على النبي ﷺ وهو في بيت فقال ألج فقال النبي ﷺ لخادمه اخرج إلى هذا فعلمه الاستئذان فقل له قل السلام عليكم أأدخل فسمعه الرجل فقال السلام عليكم أأدخل فأذن له النبي ﷺ فدخل
[Its chain of transmission is sahih] Ahmad reported it (5/368), and Nasai in Sunan al-Kubra, no. 10148, and Amal al-Yawm wal-Layla, no. 316, from the hadith of Mansur through this route, and it is found in Musannaf Ibn Abu Shayba (8/418, 419), and Nawawi graded it sahih in Riyad Al-Saliheen, no. 872.