Sunan an-Nasa'i, Book 18, Hadith 4 (Nasa'i 1537)

It was narrated that Ibn Abbas said:

"Allah (SWT) enjoined the prayer on the tongue of your Prophet (ﷺ): four (rak'ahs) while a resident, two rak'ahs while traveling, and one rak'ah during times of fear."