(27) The Book of Divorce
كتاب الطلاق
(48) Chapter: Attributing The Child To The Bed If The Owner Of The Bed Does Not Disown Him
(48) باب إِلْحَاقِ الْوَلَدِ بِالْفِرَاشِ إِذَا لَمْ يَنْفِهِ صَاحِبُ الْفِرَاشِ ‏‏
Sunan an-Nasa'i 3483 
It was narrated from Abu Hurairah that the Messenger of Allah said:
"The child is the bed's and for the fornicator is the stone."
أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، عَنْ عَبْدِ الرَّزَّاقِ، قَالَ حَدَّثَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَعِيدٍ، وَأَبِي، سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ الْوَلَدُ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ ‏"‏ ‏.‏
Grade :  Sahih (Darussalam)
Reference : Sunan an-Nasa'i 3483
In-book reference : Book 27, Hadith 95
English translation : Vol. 4, Book 27, Hadith 3513