It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that a man came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah! I find thoughts in my chest such that I would rather be burnt to charcoal than speak of them." He (peace and blessings be upon him) said: "Allah is the Greatest, Allah is the Greatest! All praise is for Allah, who has turned his (Satan's) scheme back into mere whispering."
These are the words of al-Hasan bin Muhammad.
And in the narration of Duhaym (that is, Abd al-Rahman bin Ibrahim): The Messenger of Allah (peace and blessings be upon him) said: "Allah is the Greatest, all praise is for Allah," then he mentioned the rest of the hadith.
Imam al-Nasa'i (may Allah have mercy on him) narrated it in "Amal al-Yawm wa al-Laylah" from Duhaym and said: "I do not know of anyone who corroborated Ishaq in this narration."
And the correct version is what Ibn Mahdi (may Allah have mercy on him) narrated from Sufyan, from Hammad, from Ibrahim, from the Prophet (peace and blessings be upon him), as mursal.