كتاب الصيام
13  
The Book of Fasting
(15)
Chapter: It is permissible to fast or not to fast during Ramadan for one who is travelling for no sinful purpose, if his journey is two stages or further. But it is better for the one who is able to fast without suffering any harm to do so, and the one for whom it is difficult may break the fast
(15)
باب جواز الصوم والفطر في شهر رمضان للمسافر في غير معصية إذا كان سفره مرحلتين فأكثر وأن الأفضل لمن أطاقه بلا ضرر أن يصوم ولمن يشق عليه أن يفطر
Sahih Muslim 1118 a

Humaid reported that Anas (Allah be pleased with him) was asked about fasting during Ramadan while travelling. He said:

We travelled with the Messenger of Allah (ﷺ) during the month of Ramadan, but neither the observer of the fast found fault with the breaker of the fast, nor the breaker of the fast found fault with the observer of the fast.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا أَبُو خَيْثَمَةَ، عَنْ حُمَيْدٍ، قَالَ سُئِلَ أَنَسٌ - رضى الله عنه - عَنْ صَوْمِ رَمَضَانَ فِي السَّفَرِ فَقَالَ سَافَرْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي رَمَضَانَ فَلَمْ يَعِبِ الصَّائِمُ عَلَى الْمُفْطِرِ وَلاَ الْمُفْطِرُ عَلَى الصَّائِمِ ‏.‏
Reference : Sahih Muslim 1118a
In-book reference : Book 13, Hadith 126
USC-MSA web (English) reference : Book 6, Hadith 2482
  (deprecated numbering scheme)