"I said to 'Umar bin Al-Khattab: 'There is no sin on you if you shorten salah and if you fear that the disbelievers may put you in trial (attack you). But now the people are safe.' 'Umar said: 'I wondered the same thing, so I asked the Messenger of Allah (ﷺ) about that and he said: This is a favor from Allah (SWT) to you, so accept His favor."
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنِ ابْنِ شِهَابٍ، عَنْ عَبْدِ اللَّهِ بْنِ أَبِي بَكْرِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أُمَيَّةَ بْنِ عَبْدِ اللَّهِ بْنِ خَالِدٍ، أَنَّهُ قَالَ لِعَبْدِ اللَّهِ بْنِ عُمَرَ إِنَّا نَجِدُ صَلاَةَ الْحَضَرِ وَصَلاَةَ الْخَوْفِ فِي الْقُرْآنِ وَلاَ نَجِدُ صَلاَةَ السَّفَرِ فِي الْقُرْآنِ . فَقَالَ لَهُ ابْنُ عُمَرَ يَا ابْنَ أَخِي إِنَّ اللَّهَ عَزَّ وَجَلَّ بَعَثَ إِلَيْنَا مُحَمَّدًا صلى الله عليه وسلم وَلاَ نَعْلَمُ شَيْئًا وَإِنَّمَا نَفْعَلُ كَمَا رَأَيْنَا مُحَمَّدًا صلى الله عليه وسلم يَفْعَلُ .
He said to 'Abdullah bin 'Umar: "We find (mention of) prayer when one is at home (i.e., not traveling) and prayer at times of fear in the Qur'an, but we do not find any mention in the Qur'an of prayer when traveling. Ibn Umar said to him: 'O son of my brother, Allah (SWT) send Muhammad (ﷺ) to us when we did not know anything, and all we should do is to do that which we saw Muhammad (ﷺ) doing.'"
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ الأَعْلَى، قَالَ حَدَّثَنَا خَالِدٌ، قَالَ حَدَّثَنَا ابْنُ عَوْنٍ، عَنْ مُحَمَّدٍ، عَنِ ابْنِ عَبَّاسٍ، قَالَ كُنَّا نَسِيرُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم بَيْنَ مَكَّةَ وَالْمَدِينَةِ لاَ نَخَافُ إِلاَّ اللَّهَ عَزَّ وَجَلَّ نُصَلِّي رَكْعَتَيْنِ .
"We used to travel with the Messenger of Allah (ﷺ) between Makkah and Al-Madinah, fearing nothing but Allah, the Mighty and Sublime, and praying two rak'ahs."
"I saw 'Umar bin Al-Khattab praying two rak'ahs in Dhul-Hulaifah and I asked him about that. He said: 'I am simply doing that which I saw the Messenger of Allah (ﷺ) doing.'"
أَخْبَرَنَا مُحَمَّدُ بْنُ عَلِيِّ بْنِ الْحَسَنِ بْنِ شَقِيقٍ، قَالَ أَبِي أَنْبَأَنَا أَبُو حَمْزَةَ، - وَهُوَ السُّكَّرِيُّ - عَنْ مَنْصُورٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ، عَنْ عَبْدِ اللَّهِ، قَالَ صَلَّيْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي السَّفَرِ رَكْعَتَيْنِ وَمَعَ أَبِي بَكْرٍ رَكْعَتَيْنِ وَمَعَ عُمَرَ رَكْعَتَيْنِ رضى الله عنهما .
"I prayed two rak'ahs with the Messenger of Allah (ﷺ) on a journey, and two rak'ahs with Abu Bakr, and two rak'ahs with 'Umar, may Allah (SWT) be pleased with them both."
"The prayer for jumu'ah is two rak'ahs, and for Al-Fitr is two rak'ahs, and for An-Nahr is two rak'ahs, and for traveling is two rak'ahs, complete and not shortened, on the tongue of the Prophet (ﷺ)."
"The prayer of the resident was enjoined on the tongue of your Prophet (ﷺ), four (rak'ahs), and the prayer of the traveler is two rak'ahs, and the prayer of fear is one rak'ah."
"Allah, the Mighty and Sublime, enjoined the prayer on the tongue of your Prophet (ﷺ): While a resident four (rak'ahs), while traveling two, and at times of fear one."