Uqba bin Amir reported,

I heard the Messenger of Allah ﷺ say, "When a man performs ablution and then comes to the mosque, Allah عز وجل records ten good deeds for him with every step he takes. When he prays in the mosque and then remains seated there, he is like one who fasts and devoutly worships until he returns home."

Ahmad 17456

Sahih

حدثنا يحيى بن إسحاق أخبرنا ابن لهيعة عن شيخ من معافر قال سمعت

عقبة بن عامر الجهني يقول

سمعت رسول الله ﷺ يقول إذا توضأ الرجل فأتى المسجد كتب الله عز وجل له بكل خطوة يخطوها عشر حسنات فإذا صلى في المسجد ثم قعد فيه كان كالصائم القانت حتى يرجع

أحمد 17456صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Uqba bin Amir Juhani
Numbering
Darussalam 17456
Ahmad 17456