Abdullah bin Masud reported,

We used to greet one another during the prayer, but then we were told that the prayer keeps one fully occupied.

Ibn Majah 1019

Sahih

حدثنا أحمد بن سعيد الدارمي حدثنا النضر بن شميل حدثنا يونس بن أبي إسحق عن أبي إسحق عن أبي الأحوص

عن عبد الله قال

كنا نسلم في الصلاة فقيل لنا إن في الصلاة لشغلا

ابن ماجه 1019صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
How one who is praying should respond when greeted with salam
Numbering
Darussalam 1019
Ibn Majah 1019