Abu Hurairah reported,

A man entered the mosque while the Messenger of Allah ﷺ was seated in one corner of it. He prayed, then came and greeted him.The Messenger of Allah ﷺ replied, "And upon you. Go back and pray."He then mentioned the hadith in its full length.

Tirmidhi 2692

Sahih

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

عن أبي هريرة قال

دخل رجل المسجد ورسول الله ﷺ جالس في ناحية المسجد فصلى ثم جاء فسلم عليه فقال رسول الله ﷺ وعليك ارجع فصل فذكر الحديث بطوله

الترمذي 2692صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Permission and etiquette
Chapter
How to return the greeting
Numbering
Darussalam 2692
Tirmidhi 2692