The Prophet ﷺ said, "Whoever keeps a dog, except a dog for hunting or for guarding livestock, two qirats will be deducted from his reward each day."
حدثنا سفيان
أن النبي ﷺ قال من اقتنى كلبا إلا كلب صيد أو ماشية نقص من أجره كل يوم قيراطان
Its isnad is sahih, and it is an abridgment of 4479.