Hadithcore
Sahih al-Bukhari, 6831, 6832
sahih

Narrated Zaid bin Khalid Al-Juhani:

I heard the Prophet (ﷺ) ordering that an unmarried person guilty of illegal sexual intercourse be flogged one-hundred stripes and be exiled for one year. `Umar bin Al-Khattab also exiled such a person, and this tradition is still valid.

حَدَّثَنَا مَالِكُ بْنُ إِسْمَاعِيلَ، حَدَّثَنَا عَبْدُ الْعَزِيزِ، أَخْبَرَنَا ابْنُ شِهَابٍ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ بْنِ عُتْبَةَ، عَنْ زَيْدِ بْنِ خَالِدٍ الْجُهَنِيِّ، قَالَ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَأْمُرُ فِيمَنْ زَنَى وَلَمْ يُحْصَنْ جَلْدَ مِائَةٍ وَتَغْرِيبَ عَامٍ‏.‏ قَالَ ابْنُ شِهَابٍ وَأَخْبَرَنِي عُرْوَةَ بْنُ الزُّبَيْرِ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ، غَرَّبَ، ثُمَّ لَمْ تَزَلْ تِلْكَ السُّنَّةَ‏.‏

References2 variants
In-Book Reference
Book 86, Hadith 57
USC-MSA web (English) reference
Vol. 8, Book 82, Hadith 818 (deprecated numbering scheme)