Sunan an-Nasa'i, Book 8, Hadith 43 (In-Book) ⓘ
It was narrated from Abu Qatadah that the Messenger of Allah said: "When any one of you enters the Masjid, let him pray two Rak'ahs before he sits down."
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا مَالِكٌ، عَنْ عَامِرِ بْنِ عَبْدِ اللَّهِ بْنِ الزُّبَيْرِ، عَنْ عَمْرِو بْنِ سُلَيْمِ، عَنْ أَبِي قَتَادَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يَجْلِسَ " .
also referenced under: Hadith 730 (Reference) & Volume 1, Book 8, Hadith 731 (DarusSalam)