كتاب الحج
15  
The Book of Pilgrimage
(68)
Chapter: It is recommended for pilgrims and others to enter the Ka'bah and pray therein, and supplicate in all its corners
(68)
باب اسْتِحْبَابِ دُخُولِ الْكَعْبَةِ لِلْحَاجِّ وَغَيْرِهِ وَالصَّلاَةِ فِيهَا وَالدُّعَاءِ فِي نَوَاحِيهَا كُلِّهَا
Sahih Muslim 1329 g

Salim b. Abdullah reported his father (Allah be pleased with him) saying:

I saw Allah's Messenger (ﷺ) entering the Ka'ba, and Usama b. Zaid, Bilal and 'Uthman b. Talha were along with him, but none (else) entered therein along with them. Then the door was closed for them from within. 'Abdullah b. Umar (Allah be pleased with them) said: Bilal and Uthman b. Talha informed me that Allah's Messenger (ﷺ) observed prayer in the interior of the Ka'ba between the two Yemenite pillars.
وَحَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى، أَخْبَرَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، أَخْبَرَنِي سَالِمُ بْنُ عَبْدِ اللَّهِ، عَنْ أَبِيهِ، قَالَ رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم دَخَلَ الْكَعْبَةَ هُوَ وَأُسَامَةُ بْنُ زَيْدٍ وَبِلاَلٌ وَعُثْمَانُ بْنُ طَلْحَةَ وَلَمْ يَدْخُلْهَا مَعَهُمْ أَحَدٌ ثُمَّ أُغْلِقَتْ عَلَيْهِمْ ‏.‏ قَالَ عَبْدُ اللَّهِ بْنُ عُمَرَ فَأَخْبَرَنِي بِلاَلٌ أَوْ عُثْمَانُ بْنُ طَلْحَةَ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم صَلَّى فِي جَوْفِ الْكَعْبَةِ بَيْنَ الْعَمُودَيْنِ الْيَمَانِيَيْنِ.‏
Reference : Sahih Muslim 1329g
In-book reference : Book 15, Hadith 440
USC-MSA web (English) reference : Book 7, Hadith 3074
  (deprecated numbering scheme)