Sunan an-Nasa'i, Volume 4, Book 27, Hadith 3512 (DarusSalam) ⓘ
It was narrated from Abu Hurairah that the Prophet said: "The child is the bed's and for the fornicator is the stone."
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ سَعِيدٍ، وَأَبِي، سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " الْوَلَدُ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ " .
also referenced under: Hadith 3482 (Reference) & Book 27, Hadith 94 (In-Book)