The Prophet ﷺ said to Kaab bin Ujra, "Kaab bin Ujra, fasting is a shield, charity extinguishes sin, and prayer is a means of nearness," or he said, "a proof."
أن النبي ﷺ قال لكعب بن عجرة: يا كعب بن عجرة، الصوم جنة، والصدقة تطفئ الخطيئة، والصلاة قربان أو قال: برهان.
Ahmad narrated it (14441), and Ibn Hibban graded it sahih (4514), as did Hakim (4/422), all of them via Ibn Khuthaym, from Abdul-Rahman bin Sabit, from Jabir bin Abdullah, who said, then he related it.Its chain of transmission is hasan because of Ibn Khuthaym, who is Abdullah bin Uthman, for his hadith is hasan.