Abu Thalaba reported,

Whenever the people stopped at a campsite, in another wording, whenever the Messenger of Allah ﷺ stopped at a campsite, they would scatter throughout the mountain passes and valleys.So the Messenger of Allah ﷺ said, "Your scattering through these mountain passes and valleys is only from Satan."After that, they never stopped at a campsite without huddling so close together that it used to be said, "If a single garment were spread over them, it would cover them all."

Azami 7852

Sahih

عن أبي ثعلبة الخشني قال

كان الناس إذا نزلوا منزلا- لفظ: كان الناس إذا نزل رسول الله ﷺ منزلا- تفرقوا في الشعاب والأودية فقال رسول الله ﷺ: إن تفرقكم فى هذه الشعاب والأودية إنما ذلكم من الشيطان. فلم ينزل بعد ذلك منزلا إلا انضم بعضهم إلى بعض حتى يقال: لو بسط عليهم ثوب لعمهم.

الأعظمي 7852صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Joining of soldiers to one another when they make camp
Numbering
Jami al-Kamil 7852 (2nd edition)
Azami 7852