Uqba bin Amir reported,

He used to narrate from the Messenger of Allah ﷺ that he said, "When a man purifies himself and then comes to the mosque to attend the prayer, his two recording angels, or his recording angel, write down for him ten good deeds for every step he takes toward the mosque. The one who sits awaiting the prayer is like one standing in devout worship, and he is recorded among those praying from the moment he leaves his house until he returns to it."

Ahmad 17440

Sahih

حدثنا حسن حدثنا ابن لهيعة حدثنا أبو عشانة أنه سمع

عقبة بن عامر

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

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