Abu Hurairah reported,

The Prophet ﷺ left after only two units of an obligatory prayer. A man asked him, "Messenger of Allah, has the prayer been shortened, or did you forget?"He replied, "I did neither."The people said, "Yes, you did, Messenger of Allah."So he performed two more units, then concluded the prayer, and he did not perform the two prostrations of forgetfulness.

Abu Dawud 1015

Sahih

حدثنا إسمعيل بن أسد أخبرنا شبابة حدثنا ابن أبي ذئب عن سعيد بن أبي سعيد المقبري

عن أبي هريرة

أن النبي ﷺ انصرف من الركعتين من صلاة المكتوبة فقال له رجل أقصرت الصلاة يا رسول الله أم نسيت قال كل ذلك لم أفعل فقال الناس قد فعلت ذلك يا رسول الله فركع ركعتين أخريين ثم انصرف ولم يسجد سجدتي السهو

أبو داود 1015صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
Forgetfulness in the two prostrations
Numbering
Darussalam 1015
Abu Dawud 1015