Abdullah bin Abbas reported,

A man set out on a journey, and two men followed behind him, with another man trailing the two. The third man called out, "Go back!" so the two turned back.Then he said to the traveler, "Those two were devils. I kept after them until I forced them to return. When you reach the Prophet ﷺ, convey my greetings of peace to him, and inform him that we are gathering our charity. If it were lawful for him to accept, we would have sent it to him."Upon hearing this, the Messenger of Allah ﷺ forbade traveling alone.

Azami 14781

Sahih

عن ابن عباس

أن رجلا، خرج، فتبعه رجلان، ورجل يتلوهما يقول: ارجعا قال: فرجعا قال: فقال له: إن هذين شيطانان، وإني لم أزل بهما حتى رددتهما، فإذا أتيت النبي ﷺ فأقرئه السلام، وأعلمه أنا في جمع صدقاتنا، ولو كانت تصلح له لأرسلنا بها إليه قال: فنهى رسول الله ﷺ عند ذلك عن الخلوة.

الأعظمي 14781صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Etiquette of the road, walking, and travel
Section
Dislike of traveling alone
Numbering
Jami al-Kamil 14781 (2nd edition)
Azami 14781