I accompanied Ibn Umar on a journey. He led us in two units of prayer, then turned around and saw some people standing in prayer. He asked, "What are these people doing?"I replied, "They are performing voluntary prayer."He said, "If I were going to perform voluntary prayers, I would have completed my prayer in full. Nephew, I accompanied the Messenger of Allah ﷺ on journeys, and he never prayed more than two units, until Allah took him. I accompanied Abu Bakr, and he never prayed more than two units, until Allah
took him. I accompanied Umar, and he never prayed more than two units, until Allah the Exalted took him. I accompanied Uthman, and he never prayed more than two units, until Allah the Exalted took him. And Allah
has said, 'Indeed, in the Messenger of Allah you have an excellent example' [Ahzab 33:21]."
حدثنا القعنبي
صحبت ابن عمر في طريق قال فصلى بنا ركعتين ثم أقبل فرأى ناسا قياما فقال ما يصنع هؤلاء قلت يسبحون قال لو كنت مسبحا أتممت صلاتي يا ابن أخي إني صحبت رسول الله ﷺ في السفر فلم يزد على ركعتين حتى قبضه الله عز وجل وصحبت أبا بكر فلم يزد على ركعتين حتى قبضه الله عز وجل وصحبت عمر فلم يزد على ركعتين حتى قبضه الله تعالى وصحبت عثمان فلم يزد على ركعتين حتى قبضه الله تعالى وقد قال الله عز وجل {لقد كان لكم في رسول الله أسوة حسنة}
Muslim narrated it in the Book of the Prayer of Travelers, chapter on the prayer of travelers and its shortening, hadith no. 689, from Qanabi. Bukhari narrated it in the Book of Shortening the Prayer, chapter on one who does not perform voluntary prayer during travel after the prescribed prayer, hadith no. 1102, from the hadith of Isa bin Hafs, through him.