Ubayy bin Kaab reported,

There was a man from the Ansar whose house was the farthest house in Madinah, yet he never missed a prayer with the Messenger of Allah ﷺ. We felt sorry for him, so I said to him, "So-and-so, why don't you buy a donkey to protect you from the scorching ground and from the creatures of the earth?"He replied, "By Allah, I would not want my house to be pitched right next to Muhammad's house ﷺ."I was deeply troubled by his words, so I went to the Prophet of Allah ﷺ and informed him. He summoned the man and asked him about it, and the man said the same thing, mentioning that he hoped for reward for each of his footsteps.The Prophet ﷺ said to him, "You will have what you intended."

Muslim 1516

Sahih

حدثنا محمد بن أبي بكر المقدمي حدثنا عباد بن عباد حدثنا عاصم عن أبي عثمان

عن أبي بن كعب قال

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

مسلم 1516صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Virtue of taking many steps to the mosques
Numbering
Darussalam 1516
Muslim 1516