The Messenger of Allah ﷺ said, "Whoever keeps a dog that is of no use to him for guarding crops or livestock, a qirat is deducted from his deeds each day."I asked, "Sufyan, did you yourself hear this from the Messenger of Allah ﷺ?"He replied, "Yes, by the Lord of this mosque."
أخبرنا علي بن حجر بن إياس بن مقاتل بن مشمرج بن خالد السعدي عن إسمعيل وهو ابن جعفر عن يزيد وهو ابن خصيفة قال أخبرني السائب بن يزيد أنه وفد عليهم
قال رسول الله ﷺ من اقتنى كلبا لا يغني عنه زرعا ولا ضرعا نقص من عمله كل يوم قيراط قلت يا سفيان أنت سمعت هذا من رسول الله ﷺ قال نعم ورب هذا المسجد
Reported by Muslim, no. 1576, see the previous hadith from Ali bin Hajar, and Bukhari, in the Book of Farming and Agriculture, the chapter on keeping a dog for farming, no. 2323, from the hadith of Yazid bin Khusayfa through this chain, and it is found in Kubra, no. 4796.