Sahih Muslim

Sahih Muslim 715 a

It is recommended to greet the masjid by praying two rak`ah, and it is disliked to sit before praying these two rak`ah, and this is prescribed at all times
Arabic hadith text
حَدَّثَنَا أَحْمَدُ بْنُ جَوَّاسٍ الْحَنَفِيُّ أَبُو عَاصِمٍ، حَدَّثَنَا عُبَيْدُ اللَّهِ الأَشْجَعِيُّ، عَنْ سُفْيَانَ، عَنْ مُحَارِبِ بْنِ دِثَارٍ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، قَالَ كَانَ لِي عَلَى النَّبِيِّ صلى الله عليه وسلم دَيْنٌ فَقَضَانِي وَزَادَنِي وَدَخَلْتُ عَلَيْهِ الْمَسْجِدَ فَقَالَ لِي ‏"‏صَلِّ رَكْعَتَيْنِ ‏"
Translation
Jabir b. 'Abdullah reported

The Apostle of Allah (ﷺ) owed me a debt; he paid me back and made an addition (of this). I entered the mosque and he (the Holy Prophet) said to me: Observe two rak'ahs of prayer.