Ibn 'Abbas reported: Allah has prescribed the prayer by the tongue of your Apostle (صَلَّی اللَّهُ عَلَيْهِ وَسَلَّمَ) as two rak'ahs for the traveller, four for the resident, and one in danger.
Hadith ReferenceSahih Muslim / The Book of Prayer - Travellers / Hadith: 687