Language:
كتاب الصلاة
8  
Prayers (Salat)
(96)
Chapter: To offer non-congregational As-Salat (the prayers) between the pillars
(96)
باب الصَّلاَةِ بَيْنَ السَّوَارِي فِي غَيْرِ جَمَاعَةٍ
Sahih al-Bukhari 505

Narrated Nafi`:

`Abdullah bin `Umar said, "Allah's Messenger (ﷺ) entered the Ka`ba along with Usama bin Zaid, Bilal and `Uthman bin Talha Al-Hajabi and closed the door and stayed there for some time. I asked Bilal when he came out, 'What did the Prophet (ﷺ) do?' He replied, 'He offered prayer with one pillar to his left and one to his right and three behind.' In those days the Ka`ba was supported by six pillars." Malik said: "There were two pillars on his (the Prophet's) right side."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم دَخَلَ الْكَعْبَةَ وَأُسَامَةُ بْنُ زَيْدٍ وَبِلاَلٌ وَعُثْمَانُ بْنُ طَلْحَةَ الْحَجَبِيُّ فَأَغْلَقَهَا عَلَيْهِ وَمَكَثَ فِيهَا، فَسَأَلْتُ بِلاَلاً حِينَ خَرَجَ مَا صَنَعَ النَّبِيُّ صلى الله عليه وسلم قَالَ جَعَلَ عَمُودًا عَنْ يَسَارِهِ، وَعَمُودًا عَنْ يَمِينِهِ، وَثَلاَثَةَ أَعْمِدَةٍ وَرَاءَهُ، وَكَانَ الْبَيْتُ يَوْمَئِذٍ عَلَى سِتَّةِ أَعْمِدَةٍ، ثُمَّ صَلَّى‏.‏ وَقَالَ لَنَا إِسْمَاعِيلُ حَدَّثَنِي مَالِكٌ وَقَالَ عَمُودَيْنِ عَنْ يَمِينِهِ‏.‏
Reference : Sahih al-Bukhari 505
In-book reference : Book 8, Hadith 152
USC-MSA web (English) reference : Vol. 1, Book 9, Hadith 484
  (deprecated numbering scheme)