Language:
كتاب بدء الخلق
59
Beginning of Creation
(11)
Chapter: The characteristics of Iblis (Satan) and his soldiers
(11)
باب صِفَةِ إِبْلِيسَ وَجُنُودِهِ
Sahih al-Bukhari 3271

Narrated Ibn `Abbas:

The Prophet (ﷺ) said, "If anyone of you, when having sexual relation with his wife, say: 'In the name of Allah. O Allah! Protect us from Satan and prevent Satan from approaching our offspring you are going to give us,' and if he begets a child (as a result of that relation) Satan will not harm it."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا هَمَّامٌ، عَنْ مَنْصُورٍ، عَنْ سَالِمِ بْنِ أَبِي الْجَعْدِ، عَنْ كُرَيْبٍ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ أَمَا إِنَّ أَحَدَكُمْ إِذَا أَتَى أَهْلَهُ وَقَالَ بِسْمِ اللَّهِ اللَّهُمَّ جَنِّبْنَا الشَّيْطَانَ، وَجَنِّبِ الشَّيْطَانَ مَا رَزَقْتَنَا‏.‏ فَرُزِقَا وَلَدًا، لَمْ يَضُرُّهُ الشَّيْطَانُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 3271
In-book reference : Book 59, Hadith 81
USC-MSA web (English) reference : Vol. 4, Book 54, Hadith 493
  (deprecated numbering scheme)