It is narrated from Sayyiduna Abdullah bin Salam (may Allah be pleased with him) that he said: "We were travelling with the Messenger of Allah (peace and blessings be upon him) when he (peace and blessings be upon him) heard some people saying: 'O Messenger of Allah! Which deed is the most excellent?' The Messenger of Allah (peace and blessings be upon him) said: 'Faith in Allah and His Messenger, jihad in His path, and an accepted Hajj (Hajj mabrur).' Then he (peace and blessings be upon him) heard the voice of a caller in the valley saying: 'I bear witness that there is no god but Allah and that Muhammad (peace and blessings be upon him) is the Messenger of Allah.' So the Messenger of Allah (peace and blessings be upon him) said: 'And I too bear witness, and I (also) bear witness that no one bears this witness except that he becomes free from shirk (associating partners with Allah).'"
The wording of the narration is that of the hadith of Ahmad bin Salih and Harmalah (may Allah have mercy on them both), except that in Harmalah's (may Allah have mercy on him) narration the words are "and jihad in the path of Allah."
Imam al-Nasa'i (may Allah have mercy on him) narrated it in "Amal al-Yawm wa al-Laylah" through Amr bin Mansur (may Allah have mercy on him), from Asbagh bin al-Faraj (may Allah have mercy on him), with his chain, and in it is: "We were going along with the Messenger of Allah (peace and blessings be upon him) when he (peace and blessings be upon him) heard a man in the valley saying: I bear witness that there is no god but Allah."
We have mentioned the narration of Ahmad bin Rishdin (may Allah have mercy on him) as i'tibar (for corroboration).
Imam Ibn Hibban al-Busti (may Allah have mercy on him) narrated it through Ibn Salim, from Harmalah bin Yahya (may Allah have mercy on him).