BAYHAQI 3185:
from Ibn Masʿūd ؓ —
[Machine] The Messenger of Allah, ﷺ , said, "I encountered the Shaytan, so I grabbed him and strangled him until I felt the coolness of his tongue in my hand. He said, 'You have hurt me, you have hurt me. If it were not for the supplication of Sulaiman, ﷺ , I would have him tied to a post in the mosque, and the children of Medina would have looked at him.' Jabir ibn Samurah narrated this from the Prophet, ﷺ , with a similar meaning."
البيهقي ٣١٨٥:
عن ابن مسعود ؓ —
قَالَ رَسُولُ اللهِ ﷺ مَرَّ عَلَيَّ الشَّيْطَانُ فَتَنَاوَلْتُهُ فَأَخَذْتُهُ فَخَنَقْتُهُ حَتَّى وَجَدْتُ بَرْدَ لِسَانِهِ عَلَى يَدِي وَقَالَ أَوْجَعْتَنِي أَوْجَعْتَنِي وَلَوْلَا مَا دَعَا سُلَيْمَانُ عَلَيْهِ السَّلَامُ لَأَصْبَحَ مُنَاطًا إِلَى أُسْطُوَانَةٍ مِنْ أَسَاطِينِ الْمَسْجِدِ يَنْظُرُ إِلَيْهِ وِلْدَانُ أَهْلِ الْمَدِينَةِ تَابَعَهُ جَابِرُ بْنُ سَمُرَةَ فَرَوَاهُ عَنِ النَّبِيِّ ﷺ بِمَعْنَاهُ
hadithunlocked.com