Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Whoever keeps a dog, except for a dog used for guarding livestock, hunting, or tending crops, will have a qirat deducted from his reward each day."Zuhri said that Abu Hurairah's statement was mentioned to Ibn Umar, who responded, "May Allah have mercy on Abu Hurairah. He owned crops."

Muslim 4031

Sahih

حدثنا عبد بن حميد حدثنا عبد الرزاق أخبرنا معمر عن الزهري عن أبي سلمة

عن أبي هريرة قال

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

مسلم 4031صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Sharecropping of orchards
Chapter
Command to kill dogs, its abrogation, and the prohibition of keeping them except for hunting, farming, livestock, and similar purposes
Numbering
Darussalam 4031
Muslim 4031