Jabir bin Samura reported,

We used to say, when we prayed with the Messenger of Allah ﷺ, "Peace be upon you and the mercy of Allah, peace be upon you and the mercy of Allah," gesturing with our hands to both sides.The Messenger of Allah ﷺ said, "Why do you motion with your hands as if they were the tails of restless horses? It is enough for one of you to place his hand on his thigh, then give the greeting of peace to his brother on his right and on his left."

Azami 2192

Sahih

عن جابر بن سمرة قال

كنا إذا صلينا مع رسول الله ﷺ قلنا: السلام عليكم ورحمة الله، السلام عليكم ورحمة الله، وأشار بيده إلى الجانبين، فقال رسول الله ﷺ: علام تومئون بأيديكم كأنها أذناب خيل شمس، إنما يكفي أحدكم أن يضع يده على فخذه، ثم يسلم على أخيه من على يمينه وشماله.

الأعظمي 2192صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Tashahhud and salam
Section
Saying salam to exit the prayer
Numbering
Jami al-Kamil 2192 (2nd edition)