Abu Aswad reported,

I came to Medina at a time when an illness had spread there and people were dying in great numbers. I sat down with Umar رضي الله عنه when a funeral procession passed by, and the deceased was praised with good words.Umar said, "It is guaranteed."Then another passed by and was also praised with good words, and he said, "It is guaranteed."Then a third passed by and was spoken of with ill words, and he said, "It is guaranteed."I asked, "What is guaranteed, Commander of the Believers?"He replied, "I said as the Prophet ﷺ said, 'Any Muslim for whom four people testify with good, Allah will admit him into Paradise.'"We asked, "And three?"He said, "And three."We asked, "And two?"He said, "And two."Then we did not ask him about one.

Bukhari 2643

Sahih

حدثنا موسى بن إسماعيل حدثنا داود بن أبي الفرات حدثنا عبد الله بن بريدة

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

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

البخاري 2643صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Testimonies
Chapter
How many witnesses are sufficient for validation
Numbering
Darussalam 2643
Bukhari 2643