Sayyiduna Abu Qatadah narrates this statement of the Noble Prophet (peace and blessings be upon him): "When a person enters the mosque, he should perform two rak‘ahs before sitting down." (Regarding one word here, the narrator is in doubt.)
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2499
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح دون زيادة «أَوْ يَسْتَخْبِرَ»؛ فإنها شاذة - المصدر نفسه.فضيلة الشيخ العلّامة شُعيب الأرناؤوطرجاله ثقات رجال الشيخين، همام: هو ابن يحيى بن دينار الأزدي.