(11) باب اسْتِحْبَابِ تَحِيَّةِ الْمَسْجِدِ بِرَكْعَتَيْنِ وَكَرَاهَةِ الْجُلُوسِ قَبْلَ صَلاَتِهِمَا وَأَنَّهَا مَشْرُوعَةٌ فِي جَمِيعِ الأَوْقَاتِ
Abu Qatada (a Companion of the Prophet) reported Allah's Messenger (ﷺ) as saying:
When any one of you enters the mosque, he should observe two rak'ahs (of Nafl prayer) before sitting. (IT)
Reference (IT): Sahih Muslim 714 a (IT)
In-book reference (IT): Book 6, Hadith 84 (IT)
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 1540 (IT)