كتاب الصيام
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 1114 a

Jabir b. 'Abdullah (Allah be pleased with both of them) reported that Allah's Messenger (ﷺ) went out to Mecca in Ramadan in the year of Victory, and he and the people fasted till he came to Kura' al-Ghamim and the people also fasted. He then called for a cup of water which he raised till the people saw it, and then he drank. He was told afterwards that some people had continued to fast, and he said:

These people are the disobedient ones; these are the disobedient ones.
حَدَّثَنِي مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا عَبْدُ الْوَهَّابِ، - يَعْنِي ابْنَ عَبْدِ الْمَجِيدِ - حَدَّثَنَا جَعْفَرٌ، عَنْ أَبِيهِ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، - رضى الله عنهما - أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم خَرَجَ عَامَ الْفَتْحِ إِلَى مَكَّةَ فِي رَمَضَانَ فَصَامَ حَتَّى بَلَغَ كُرَاعَ الْغَمِيمِ فَصَامَ النَّاسُ ثُمَّ دَعَا بِقَدَحٍ مِنْ مَاءٍ فَرَفَعَهُ حَتَّى نَظَرَ النَّاسُ إِلَيْهِ ثُمَّ شَرِبَ فَقِيلَ لَهُ بَعْدَ ذَلِكَ إِنَّ بَعْضَ النَّاسِ قَدْ صَامَ فَقَالَ ‏ "‏ أُولَئِكَ الْعُصَاةُ أُولَئِكَ الْعُصَاةُ ‏"‏ ‏.‏
Reference : Sahih Muslim 1114a
In-book reference : Book 13, Hadith 116
USC-MSA web (English) reference : Book 6, Hadith 2472
  (deprecated numbering scheme)