Sahih Muslim
The Book of Prayers (Kitab Al-Salat)
Book Number: 004 / Hadith Number: 1464
Ibn 'Abbas reported: Allah has prescribed the prayer by the tongue of your Apostle (may peace be upon him) as two rak'ahs for the traveller, four for the resident, and one in danger.