The Messenger of Allah ﷺ came to the Quba mosque to pray there, and some men from the Ansar came to greet him with salaam. I asked Suhayb, who was with him, how the Messenger of Allah ﷺ returned their greeting. He replied, "He would gesture with his hand."
حدثنا علي بن محمد الطنافسي قال حدثنا سفيان بن عيينة عن زيد بن أسلم
أتى رسول الله ﷺ مسجد قباء يصلي فيه فجاءت رجال من الأنصار يسلمون عليه فسألت صهيبا وكان معه كيف كان رسول الله ﷺ يرد عليهم قال كان يشير بيده
Sourcing, sahih. Nasai narrated it, 3/5, 6, chapter on the forgetfulness, section on returning the greeting with a gesture during prayer, hadith 1188, from the hadith of Sufyan, through this chain, from Zayd bin Aslam, who explicitly stated that he heard it directly, as recorded by Ibn Khuzayma, 2/49, hadith 888. Ibn Khuzayma and Ibn Hibban graded it sahih (al-Ihsan), hadith 2258, as did Hakim, 3/12, and Dhahabi. It has many corroborating narrations.