Abdullah bin Abbas reported,

Umar bin Khattab set out for Sham, and when he reached Sargh, the commanders of the army, Abu Ubayda bin Jarra and his companions, met him and informed him that an epidemic had broken out in Sham. The hadith goes on to mention the discussion that followed.Then Abdul-Rahman bin Awf came, having been absent attending to some need of his, and said, "I have some knowledge about this. I heard the Messenger of Allah ﷺ say, 'If it occurs in a land while you are in it, do not leave fleeing from it, and if you hear of it in a land, do not enter it.'"So Umar praised Allah and then departed.

Ahmad 1683

Sahih

حدثنا إسحاق بن عيسى أخبرني مالك عن الزهري عن عبد الحميد بن عبد الرحمن بن زيد بن الخطاب عن عبد الله بن عبد الله بن الحارث بن نوفل

عن عبد الله بن عباس

أن عمر بن الخطاب خرج إلى الشام حتى إذا كان بسرغ لقيه أمراء الأجناد أبو عبيدة بن الجراح وأصحابه فأخبروه أن الوباء قد وقع بالشام فذكر الحديث قال فجاء عبد الرحمن بن عوف وكان متغيبا في بعض حاجته فقال إن عندي من هذا علما سمعت رسول الله ﷺ يقول إذا كان بأرض وأنتم بها فلا تخرجوا فرارا منه وإذا سمعتم به بأرض فلا تقدموا عليه قال فحمد الله عمر ثم انصرف

أحمد 1683صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdul-Rahman bin Awf Zuhri
Numbering
Darussalam 1683
Ahmad 1683