Jami` at-Tirmidhi, Book 8, Hadith 112 (In-Book)

Zirr said: "I said to Ubayy bin Ka'b: 'O Abu Al-Mundhir! How do you know that it is the night of the twenty-seventh?' He said: 'Rather, the Messenger of Allah informed us that it is a night (after which) the sun rises without rays, so we counted and we remembered it. By Allah! Ibn Mas'ud learned that it is in Ramadan and that it is the nigh of the twenty-seventh, but he did not want to inform you lest you would depend on it."

حَدَّثَنَا وَاصِلُ بْنُ عَبْدِ الأَعْلَى الْكُوفِيُّ، حَدَّثَنَا أَبُو بَكْرِ بْنُ عَيَّاشٍ، عَنْ عَاصِمٍ، عَنْ زِرٍّ، قَالَ قُلْتُ لأُبَىِّ بْنِ كَعْبٍ أَنَّى عَلِمْتَ أَبَا الْمُنْذِرِ أَنَّهَا لَيْلَةُ سَبْعٍ وَعِشْرِينَ قَالَ بَلَى أَخْبَرَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ أَنَّهَا لَيْلَةٌ صَبِيحَتُهَا تَطْلُعُ الشَّمْسُ لَيْسَ لَهَا شُعَاعٌ ‏" ‏ ‏.‏ فَعَدَدْنَا وَحَفِظْنَا وَاللَّهِ لَقَدْ عَلِمَ ابْنُ مَسْعُودٍ أَنَّهَا فِي رَمَضَانَ وَأَنَّهَا لَيْلَةُ سَبْعٍ وَعِشْرِينَ وَلَكِنْ كَرِهَ أَنْ يُخْبِرَكُمْ فَتَتَّكِلُوا ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ ‏.‏

sunnah.com