The Messenger of Allah ﷺ said, "Whoever keeps a dog, other than one for guarding crops, livestock, or hunting, his deeds will be reduced by one qirat each day."I said to Ibn Umar, "What if the dog is in the house and I dislike its presence?"He replied, "The responsibility falls upon the owner of the house who possesses it."
حدثنا يزيد أخبرنا همام بن يحيى عن قتادة عن أبي الحكم البجلي
قال رسول الله ﷺ من اتخذ كلبا غير كلب زرع أو ضرع أو صيد نقص من عمله كل يوم قيراط فقلت لابن عمر إن كان في دار وأنا له كاره قال هو على رب الدار الذي يملكها
Its isnad is sahih. Abu Hakam Bajali is Abdul-Rahman bin Abu Naim, with a damma on the nun and a sukun on the ayn, the Kufan worshipper. He was a trustworthy tabii. Ibn Hibban said, he was among the worshippers of the people of Kufa, one of those who could endure constant hunger. Hajjaj seized him intending to kill him, and put him in a dark room, sealing the door for fifteen days. Then he ordered the door opened so he could be taken out and buried, but when they went in to him, he was standing in prayer. So Hajjaj said to him, "Go wherever you wish."The hadith is given at length under 4549, and see also 4479.