IBNHIBBAN 579:
from Abū Mūsá —
[Machine] The Messenger of Allah ﷺ said, "The example of a good companion is like that of a perfumer. Even if you do not get any perfume from him, you will still benefit from his pleasant fragrance. And the example of a bad companion is like that of a blacksmith. Even if he does not burn you with his sparks, you will still get affected by his foul smell."
ابن حبّان ٥٧٩:
عن ابو موسى —
قَالَ رَسُولُ اللَّهِ ﷺ «مَثَلُ الْجَلِيسِ الصَّالِحِ مَثَلُ الْعَطَّارِ إِنْ لَمْ يُصِبْكَ مِنْهُ أَصَابَكَ رِيحُهُ وَمَثَلُ الْجَلِيسِ السُّوءِ مَثَلُ الْقَيْنِ إِنْ لَمْ يُحْرِقْكَ بِشَرَرِهِ عَلِقَ بِكَ مِنْ رِيحِهِ»
hadithunlocked.com