Itban bin Malik reported,

The Prophet ﷺ came to him at his house and asked, "Where in your house would you like me to pray for you?"He said, "I pointed out a spot for him."The Prophet ﷺ then said the takbir, and we lined up in rows behind him, and he prayed two rakahs.

Bukhari 424

Sahih

حدثنا عبد الله بن مسلمة قال حدثنا إبراهيم بن سعد عن ابن شهاب عن محمود بن الربيع

عن عتبان بن مالك

أن النبي ﷺ أتاه في منزله فقال أين تحب أن أصلي لك من بيتك قال فأشرت له إلى مكان فكبر النبي ﷺ وصففنا خلفه فصلى ركعتين

البخاري 424صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Prayer
Chapter
If he enters a house, he prays wherever he wishes or wherever he is told, and does not spy
Numbering
Darussalam 424
Bukhari 424