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."
English reference: Vol. 3, Book 20, Hadith 2611
Arabic reference: Book 20, Hadith 2709