The Prophet ﷺ said, "If one of you, when he intends to be intimate with his wife, says, 'In the name of Allah. O Allah, keep Satan away from us, and keep Satan away from what You grant us,' then if a child is decreed for them from that union, no devil will ever harm him."
قال النبي ﷺ: لو أن أحدهم إذا أراد أن يأتي أهله قال: باسم الله، اللهم جنبنا الشيطان، وجنب الشيطان ما رزقتنا. فإنه إن يقدر بينهما ولد في ذلك لم يضره شيطان أبدا.
Bukhari narrated it in the chapter on supplications (6388), and Muslim in the chapter on marriage (1434), both through Jareer, from Mansur, from Salim bin Abu Jaad, from Kurayb, from Ibn Abbas, and he related it.Regarding his saying, "no devil will ever harm him," Qadi Iyad said, "It has been said that this harm means the child will not be struck down by epilepsy, and it has also been said that the devil will not pierce him at his birth. No one has taken it to apply generally to every kind of harm, whispering, and temptation." End of quote, from Sharh Sahih Muslim (5/10).