The Messenger of Allah ﷺ used to seclude himself in the mosque during the last ten days of Ramadan, and he would say, "Seek out Laylat al-Qadr in the last ten days of Ramadan."
حدثنا هارون بن إسحق الهمداني حدثنا عبدة بن سليمان عن هشام بن عروة عن أبيه
كان رسول الله ﷺ يجاور في العشر الأواخر من رمضان ويقول تحروا ليلة القدر في العشر الأواخر من رمضان
Agreed upon. Bukhari recorded it in the Virtue of Laylat al-Qadr, chapter on seeking out Laylat al-Qadr on the odd nights of the last ten nights, no. 2020, from the hadith of Abda. And Muslim recorded it in the Book of Fasting, chapter on the virtue of Laylat al-Qadr and the encouragement to seek it, no. 1169, from the hadith of Hisham bin Urwa, with the same wording.On this same topic there are also narrations from Umar [Ahmad: 1/14, 43, and Ibn Khuzayma, nos. 73, 74, 2172], Ubayy bin Kaab [to come, no. 793], Jabir bin Samura [Ahmad: 5/86, 88], Jabir bin Abdullah [Ahmad: 3/336, and Ibn Khuzayma, no. 2190], Ibn Umar [Bukhari, no. 2015, and Muslim, no. 1165], Faltan bin Asim [Ibn Abu Shayba: 2/514, 515], Anas [Ahmad: 3/234, and Muwatta: 1/320], Abu Saeed [Bukhari, no. 2018, and Muslim, no. 1167], Abdullah bin Unays [Muslim, no. 1168], Abu Bakra [to come, no. 794], Ibn Abbas [Bukhari, no. 2021], Bilal [Ahmad: 6/12], and Ubada bin Samit [Bukhari, no. 2023].The hadith of Ubayy bin Kaab was also recorded by Muslim, no. 762/220 (Book of Fasting). The report from Abu Qilaba has a sahih chain of transmission.