Sahl bin Saad reported,

The Messenger of Allah ﷺ said, "This good consists of treasures, and those treasures have keys. Blessed is the servant whom Allah has made a key to good and a lock against evil, and woe to the servant whom Allah has made a key to evil and a lock against good."

Ibn Majah 238

Daif

حدثنا هارون بن سعيد الأيلي أبو جعفر حدثنا عبد الله بن وهب أخبرني عبد الرحمن بن زيد بن أسلم عن أبي حازم

عن سهل بن سعد

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

ابن ماجه 238ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Sunnah
Chapter
One who is a key to good
Numbering
Darussalam 238
Ibn Majah 238