The Messenger of Allah ﷺ was on a journey when he saw a man surrounded by a crowd, with people shading him. He asked, "What is this?"They replied, "He is fasting."He said, "It is not righteousness to fast while traveling."
حدثنا يحيى بن سعيد عن شعبة حدثنا محمد بن عبد الرحمن عن محمد بن عمرو بن الحسن
أن رسول الله ﷺ كان في سفر فرأى رجلا عليه زحام قد ظلل عليه فقال ما هذا قالوا صائم قال ليس من البر الصيام أو البر الصائم في السفر
Its isnad is sahih. Muhammad bin Abdul-Rahman is Ibn Saad bin Zurara al-Ansari, the trustworthy one, and likewise Muhammad bin Amr bin Hasan bin Ali bin Abu Talib. The hadith has already appeared at 14347. 14127.