Shubayl bin Azrah (may Allah have mercy on him) said: Qatadah (may Allah have mercy on him) and I went to Sayyiduna Anas bin Malik (may Allah be pleased with him), and Sayyiduna Anas bin Malik (may Allah be pleased with him) told us that the Messenger of Allah (peace and blessings be upon him) said: "The example of a righteous companion is like that of a perfume seller: even if you do not get anything (directly) from him, his fragrance will surely reach you. And the example of an evil companion is like that of a blacksmith: even if nothing (no spark or soot) from him touches you, his smoke will surely reach you."
Imam Abu Dawud (may Allah have mercy on him) narrated it through Abdullah bin al-Sabbah al-Attar, Sa'id bin Amir and Shubayl.
It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The example of a righteous companion is like that of a perfume seller: even if you do not obtain his perfume, or he (peace and blessings be upon him) said: even if he does not give you any of his perfume, you still get his fragrance. And the example of an evil companion is like that of a blacksmith: even if he does not burn your clothes, his (unpleasant) smell still reaches you."
وَأَخْبَرَنَا أَبُو الْقَاسِمِ مَحْمُودُ بْنُ مُحَمَّدِ بْنِ مَحْمُودٍ الْحَدَّادُ - بِأَصْبَهَانَ - أَنَّ أَبَا الْخَيْرِ مُحَمَّدَ بْنَ أَحْمَدَ بْنِ مُحَمَّدٍ الْبَاغْبَانَ أَخْبَرَهُمْ ، أَبْنَا إِبْرَاهِيمُ بْنُ مُحَمَّدِ بْنِ إِبْرَاهِيمَ الطَّيَّانُ ، أَبْنَا
إِبْرَاهِيمُ بْنُ عَبْدِ اللهِ بْنِ خُرَّشِيذَ قَوْلَهُ ، ثَنَا
أَبُو الْقَاسِمِ عَبْدُ اللهِ بْنُ مُحَمَّدٍ - يُعْرَفُ بِحَامِضِ رَأْسٍ ، بِبَغْدَادَ - ثَنَا إِسْحَاقُ بْنُ أَحْمَدَ الْبُخَارِيُّ - بِبُخَارَى - عَنْ
سَعِيدِ بْنِ عَامِرٍ قَالَ : حَمَلَنِي خَالِي عَلَى عَاتِقِهِ ، فَسَمِعْتُ
شُبَيْلًا يُحَدِّثُ عَنْ
أَنَسٍ ، عَنِ النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ : مَثَلُ الْجَلِيسِ الصَّالِحِ مَثَلُ الْعَطَّارِ ، إِنْ أَصَابَكَ مِنْ عِطْرِهِ ، وَإِلَّا أَصَابَكَ مِنْ رِيحِهِ ، وَمَثَلُ الْجَلِيسِ السَّوْءِ مَثَلُ الْقَيْنِ ، إِنْ لَمْ يَحْرِقْ ثَوْبَكَ أَصَابَكَ مِنْ رِيحِهِ .
وَقَدْ رُوِيَ فِي الصَّحِيحَيْنِ مِنْ رِوَايَةِ
أَبِي مُوسَى الْأَشْعَرِيِّ .
Sa'id bin Amir (may Allah have mercy on him) said: "My maternal uncle was carrying me on his shoulder, and I heard Shubayl (may Allah have mercy on him) narrating from Sayyiduna Anas (may Allah be pleased with him), from the Prophet (peace and blessings be upon him), that he (peace and blessings be upon him) said: 'The example of a righteous companion is like that of a perfume seller: even if his perfume does not touch you, his fragrance will still reach you. And the example of an evil companion is like that of a blacksmith: even if he does not burn your clothes, his (unpleasant) smell will surely reach you.'"
This narration is reported in the two Sahihs (al-Bukhari and Muslim) through the narration of Sayyiduna Abu Musa al-Ash'ari (may Allah be pleased with him).