ENOfficial
In the hadith transmitted on the authority of Yahya, he (the Holy Prophet) permitted the keeping of dogs for (the protection of) herds, for hunting and (the protection of) cultivated land.
Source: sunnah.com
Other translations
Arabic
وَحَدَّثَنِيهِ يَحْيَى بْنُ حَبِيبٍ، حَدَّثَنَا خَالِدٌ يَعْنِي ابْنَ الْحَارِثِ، ح وَحَدَّثَنِي مُحَمَّدُ بْنُ، حَاتِمٍ حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، ح وَحَدَّثَنِي مُحَمَّدُ بْنُ الْوَلِيدِ، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، ح وَحَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا النَّضْرُ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا وَهْبُ بْنُ جَرِيرٍ، كُلُّهُمْ عَنْ شُعْبَةَ، بِهَذَا الإِسْنَادِ . وَقَالَ ابْنُ حَاتِمٍ فِي حَدِيثِهِ عَنْ يَحْيَى، وَرَخَّصَ، فِي كَلْبِ الْغَنَمِ وَالصَّيْدِ وَالزَّرْعِ .
sunnah.com