The Messenger of Allah ﷺ used to give the salam to his right and to his left.
أخبرنا محمد بن إسمعيل بن إبراهيم قال حدثنا سليمان يعني ابن داود الهاشمي قال حدثنا إبراهيم وهو ابن سعد قال حدثني عبد الله بن جعفر وهو ابن المسور المخرمي عن إسمعيل بن محمد قال حدثني
أن رسول الله ﷺ كان يسلم عن يمينه وعن يساره
Muslim reported it in "the Book of Mosques, Chapter: Salam to Conclude the Prayer Upon Finishing It, and How It Is Done," no. 582, from the hadith of Abdullah bin Jafar Makhrami, and it is in Kubra, no. 1239.