The Prophet ﷺ used to give the salutation to his right and to his left.
حدثنا محمد بن عبد الله بن الزبير حدثنا سفيان عن سلمة بن كهيل عن حجر بن عنبس
أن النبي ﷺ كان يسلم عن يمينه وعن شماله
Its isnad is sahih, and it is found in Muslim 1/409, no. 582, in the Book of Mosques, "The Taslim Ends the Prayer."