Al-Adab Al-Mufrad, Book 43, Hadith 1066 (English)

Regarding the person who asks for permission to enter before he gives the greeting, Abu Hurayra said, "He is not given permission until he has first given the greeting."

حَدَّثَنَا بَيَانُ، قَالَ‏:‏ حَدَّثَنَا يَزِيدُ، قَالَ‏:‏ حَدَّثَنَا عَبْدُ الْمَلِكِ بْنُ أَبِي سُلَيْمَانَ، عَنْ عَطَاءٍ، عَنْ أَبِي هُرَيْرَةَ فِيمَنْ يَسْتَأْذِنُ قَبْلَ أَنْ يُسَلِّمَ قَالَ‏:‏ لاَ يُؤْذَنُ لَهُ حَتَّى يَبْدَأَ بِالسَّلامِ‏.‏

sunnah.com