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."
كنا إذا صلينا مع رسول الله ﷺ قلنا: السلام عليكم ورحمة الله، السلام عليكم ورحمة الله، وأشار بيده إلى الجانبين، فقال رسول الله ﷺ: علام تومئون بأيديكم كأنها أذناب خيل شمس، إنما يكفي أحدكم أن يضع يده على فخذه، ثم يسلم على أخيه من على يمينه وشماله.
Muslim narrated it in the Book of Prayer (431) through the route of Masaar, who said, "Ubaydullah ibn Qibtiyya told me, from Jabir bin Samura," and he mentioned something similar. In another version, he said, "We prayed with the Messenger of Allah ﷺ, and when we finished the prayer with the taslim, we would say with our hands, 'Peace be upon you, peace be upon you.' The Messenger of Allah ﷺ looked at us and said, 'What is the matter with you, gesturing with your hands as if they were the tails of unruly horses? When one of you says the taslim, let him turn to his companion and not gesture with his hand.'"Muslim also narrated it through another route, from Furat Qazzaz, from Ubaydullah, from Jabir bin Samura, with the same wording. In another version, "What is the matter with me, that I see you raising your hands as if they were the tails of unruly horses? Be still in the prayer."Muslim also narrated it through another route, from Amash, from Musayab bin Rafi, from Tamim bin Tarafa, from Jabir bin Samura, and he mentioned something similar.His saying "the tails of unruly horses" (khayl shumus) is the plural of shamus, like rasul and rusul, referring to horses that will not stay still, but rather thrash and move about with their tails and legs.His saying "What is the matter with me, that I see you raising your hands" - what is meant by the raising that is forbidden here is their raising their hands at the taslim, gesturing with the greeting toward both sides, as is made explicit in the first version.