Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:3922Mūsá b. Ismāʿīl > Hammām > Thābit > Anas > Abū Bakr

I was with the Prophet ﷺ in the Cave. When I raised my head, I saw the feet of the people. I said, "O Messenger of Allah ﷺ! If some of them should look down, they will see us." The Prophet ﷺ said, "O Abu Bakr, be quiet! (For we are) two and Allah is the Third of us."  

البخاري:٣٩٢٢حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ حَدَّثَنَا هَمَّامٌ عَنْ ثَابِتٍ عَنْ أَنَسٍ عَنْ أَبِي بَكْرٍ ؓ قَالَ

كُنْتُ مَعَ النَّبِيِّ ﷺ فِي الْغَارِ فَرَفَعْتُ رَأْسِي فَإِذَا أَنَا بِأَقْدَامِ الْقَوْمِ فَقُلْتُ يَا نَبِيَّ اللَّهِ لَوْ أَنَّ بَعْضَهُمْ طَأْطَأَ بَصَرَهُ رَآنَا قَالَ اسْكُتْ يَا أَبَا بَكْرٍ اثْنَانِ اللَّهُ ثَالِثُهُمَا