Jami` at-Tirmidhi, Book 25, Hadith 21 (In-Book)

Narrated Jabir bin Samurah: "The Messenger of Allah was staying with Abu Ayyub. When he ate some food, he would send what was left to him. So one day he sent him some food but the Prophet did not eat from it. So Abu Ayyub went to the Prophet and mentioned that to him. The Prophet said: 'It contained garlic.' So he said: 'O Messenger of Allah! Is it unlawful?' He said: 'No, I dislike it because of its odor.'" He said: This Hadith is Hasan Sahih.

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

sunnah.com