Whenever the Messenger of Allah ﷺ stopped at a place to camp, the people would scatter away from him into the mountain passes and valleys. So he stood among them and said, "Your scattering in these passes and valleys is from Satan."After that, whenever they camped, they would draw close to one another, so much so that you would say, if a cloak were spread over them, it would cover them all, or something to that effect.
حدثنا علي بن بحر قال حدثنا الوليد بن مسلم حدثنا عبد الله يعني ابن زبر أنه سمع مسلم بن مشكم يقول حدثنا
كان الناس إذا نزل رسول الله ﷺ منزلا فعسكر تفرقوا عنه في الشعاب والأودية فقام في فقال إن تفرقكم في الشعاب إنما ذلكم من الشيطان قال فكانوا بعد ذلك إذا نزلوا انضم بعضهم إلى بعض حتى إنك لتقول لو بسطت عليهم كساء لعمهم أو نحو ذلك
Its chain of transmission is sahih. Abdullah bin Zabr is here named after his grandfather, and his full name is Abdullah bin Ala bin Zabr. He is a trustworthy and eminent narrator whose hadith appears in Bukhari. Muslim bin Mishkam Khuzai Dimashqi is a trustworthy narrator among the finest of the successors, and the leading scholars affirmed his trustworthiness and praised him.The hadith was narrated by Abu Dawud, 3/41, number 2628, in the book of jihad, on what is commanded regarding the army staying together.