The Prophet ﷺ said, "Whoever takes up arms against us is not one of us, nor is the one who lies in ambush along the road."
حدثنا أبو النضر حدثنا محمد عن سليمان بن موسى
عن النبي ﷺ أنه قال من حمل علينا السلاح فليس منا ولا رصد بطريق
Its chain of transmission is sahih. Muhammad is Ibn Rashid.The first part of the hadith, namely his saying, "Whoever bears arms against us is not one of us," has occurred repeatedly before from the hadith of Abdullah bin Umar bin Khattab, the most recent instance being (6381). I have not found it from the hadith of Ibn Amr bin As except in Musnad Ahmad, and I have not found it in Majma al-Zawaid, nor have I found any reference to it in any of the sources available to me.As for the second part, namely his saying, "There is to be no ambush on the road," I have not found it at all outside the Musnad, nor have I found any reference to it in any of the collections. The hadith, in both its parts, is an abridgment of longer narrations that will come later (6742, 7033, 7088).