Bulugh al-Maram, Book 10, Hadith 1249 (English)

Abu Hurairah (RAA) narrated, 'I heard the Messenger of Allah say, "When the slave-woman of one of you commits adultery and she is proven guilty (through witnesses or confession), he should flog her as prescribed (for the slave woman), but he should not admonish her. If she does this again, then she should be flogged again but he should not admonish her. If she commits it for the third time, and she is proven guilty, then he must sell her even if it was for a rope of hair." Agreed upon, and the wording is from Muslim.

وَعَنْ أَبِي هُرَيْرَةَ ‏- رضى الله عنه ‏- سَمِعْتُ رَسُولَ اَللَّهِ ‏- صلى الله عليه وسلم ‏-يَقُولُ: { "إِذَا زَنَتْ أَمَةُ أَحَدِكُمْ, فَتَبَيَّنَ زِنَاهَا, فَلْيَجْلِدْهَا اَلْحَدَّ, وَلَا يُثَرِّبْ عَلَيْهَا, ثُمَّ إِنْ زَنَتْ فَلْيَجْلِدْهَا اَلْحَدَّ, وَلَا يُثَرِّبْ عَلَيْهَا, ثُمَّ إِنْ زَنَتِ اَلثَّالِثَةَ, فَتَبَيَّنَ زِنَاهَا, فَلْيَبِعْهَا وَلَوْ بِحَبْلٍ مِنْ شَعَرٍ } مُتَّفَقٌ عَلَيْهِ وَهَذَا لَفْظُ مُسْلِمٍ (1575)‏.‏ ‏3 ‏- صحيح.‏ رواه البخاري (2152)‏، ومسلم (1703)‏.‏

sunnah.com

also referenced under: Book 10, Hadith 1210 (In-Book)