The Messenger of Allah ﷺ traveled from Mecca to Medina fearing none but the Lord of the Worlds, praying two rakahs.
أخبرنا قتيبة قال حدثنا هشيم عن منصور بن زاذان عن ابن سيرين
أن رسول الله ﷺ خرج من مكة إلى المدينة لا يخاف إلا رب العالمين يصلي ركعتين
Sahih. Reported by Tirmidhi, Prayer, chapter on shortening prayer while traveling, no. 547, from Qutayba, and he said, "Hasan sahih." It is also in Kubra, no. 1893. See the following hadith.