Mishkat al-Masabih #2013
Fasting
The Arabic includes the chain of narration (sanad) and the collector's commentary; the English translation shows the Prophet's words only.
وَعَنِ ابْنِ عَبَّاسٍ: أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ فِي الْمُعْتَكَفِ: «هُوَ يَعْتَكِفُ الذُّنُوبَ وَيُجْرَى لَهُ مِنَ الْحَسَنَاتِ كَعَامِلِ الْحَسَنَات كلهَا» . رَوَاهُ ابْن مَاجَه
Ibn ‘Abbas reported God’s messenger as saying about one who observes a period of private devotion in a mosque, “He turns away from sins and he is rewarded for good deeds like one who does all good deeds.”
Ibn Majah transmitted it.
Topics
About Mishkat al-Masabih
This hadith is #2013 from Mishkat al-Masabih, in the Book of Fasting.