Sayyiduna Abu Hurayrah (may Allah be pleased with him) says: O people! Indeed Allah Almighty has made obligatory, through the tongue of your Prophet, four rak'ahs when resident and two rak'ahs when travelling.
Ahmad recorded it; its chain mentions that Ubaydullah bin Zahr narrated it from Sayyiduna Abu Hurayrah (may Allah be pleased with him). I have not found anyone who wrote his biography, and I have recorded this narration in this way from the Musnad after checking. The rest of its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2934