Sahih Muslim Book 4, Hadith 133
We said our prayer with the Messenger of Allah (ﷺ) and, while pronouncing salutations, we made gestures with our hands (indicating)" Peace be upon you, peace be upon you." The Messenger of Allah (ﷺ) looked towards us and said: Why is it that you make gestures with your hands like the tails of headstrong horses? When any one of you pro- nounces salutation (in prayer) he should only turn his face towards his companion and should not make a gesture with his hand.
When we said prayer with the Messenger of Allah (ﷺ), we pronounced: Peace be upon you and Mercy of Allah, peace be upon you and Mercy of Allah, and made gesture with the hand on both the sides. Upon this the Messenger of Allah (may peace be upon him said: What do you point out with your hands as if they are the tails of headstrong horses? This is enough for you that one should place one's hand on one's thigh and then pronounce salutation upon one's brother on the right side and then on the left.
The Messenger of Allah (may peace he upon him) used to touch our shoulders in prayer and say: Keep straight, don't be irregular, for there would be dissension in your hearts. Let those of you who are sedate and prudent be near me, then those who are next to them, then those who are next to them. Abu Mas'ud said: Now-a-days there is much dissension amongst you.