Sunan Ibn Majah
It was narrated from Abdullah bin Amr that the Messenger of Allah (ﷺ) said: “Whoever claims to belong to someone other than his father will not smell the fragrance of Paradise, even though its fragrance may be detected from a distance of five hundred years.”
حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ، أَنْبَأَنَا سُفْيَانُ، عَنْ عَبْدِ الْكَرِيمِ، عَنْ مُجَاهِدٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنِ ادَّعَى إِلَى غَيْرِ أَبِيهِ لَمْ يَرَحْ رَائِحَةَ الْجَنَّةِ وَإِنَّ رِيحَهَا لَيُوجَدُ مِنْ مَسِيرَةِ خَمْسِمِائَةِ عَامٍ " .
Grade: Sahih (Darussalam)
Reference