Abu Aswad reported,

I came to Medina at a time when an illness had struck the city and people were dying in great numbers. I sat with Umar bin Khattab رضي الله عنه when a funeral procession passed by, and the deceased was praised with good words.Umar رضي الله عنه said, "It is confirmed."Then another procession passed, and the deceased was likewise praised with good words.Umar said, "It is confirmed."Then a third passed, and the deceased was spoken of with ill words.Umar رضي الله عنه said, "It is confirmed."I asked, "What is confirmed, Commander of the Faithful?"He replied, "I said only what the Messenger of Allah ﷺ said, 'Any Muslim for whom four people testify with good, Allah will admit him into Paradise.' We asked, 'Or three?' He said, 'Or three.' We asked, 'Or two?' He said, 'Or two.' Then we did not ask him about one."

Ahmad 204

Sahih

حدثنا عبد الله بن يزيد حدثنا داود يعني ابن أبي الفرات حدثني عبد الله بن بريدة

عن أبي الأسود الديلي قال

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

أحمد 204صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Umar bin Khattab
Numbering
Darussalam 204
Ahmad 204