Sahih Muslim Book 4, Hadith Number 1545.

Chapter : Excellence of greeting the mosque with two Rak’ahs and undesirability of sitting down before observing them.

Ka’b b. Malik reported: The Messenger of Allah (may peace be upon him) did not come back from the journey but by day in the forenoon, and when he arrived, he went first to the mosque, and having prayed two rak’ahs in it he sat down in it.