It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with both of them) that when the Prophet (peace and blessings of Allah be upon him) was on a journey, he would perform only two rak'ahs (shortened prayer).
Hadith Referenceمسند احمد / ومن مسند بني هاشم / 3349