It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "When the gaze has entered the house, then what permission is there?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17660
Hudhayl bin Shurahbil (may Allah have mercy on him) says that Sayyiduna Sa'd bin Mu'adh (may Allah be pleased with him) came to the Prophet (peace and blessings be upon him) and sought permission while standing facing the door. He (peace and blessings be upon him) moved him to one side with his hand and said: "Seek permission like this; permission has been prescribed only because of sight."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17661
Hilal bin Yasaf (may Allah have mercy on him) says that Sayyiduna Sa'd (may Allah be pleased with him) sought permission from the Prophet (peace and blessings be upon him) while standing directly facing the door. He said to him: "When you seek permission, do not face the door."
Both of these reports are mursal.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17662
Sayyiduna Abdullah bin Busr (may Allah be pleased with him) says that when the Prophet (peace and blessings be upon him) came to someone's door, he would stand by the wall to the right or the left, then seek permission; if it was given, well and good, otherwise he would return. This was at the time when there were no curtains on the doors, and while seeking permission he would say the greeting of peace (salam).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17663