Abu Huraira (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying
A time will come for the people (of Medina) when a man will invite his cousin and any other near relation: Come (and settle) at (a place) where living is cheap, come to where there is plenty, but Medina will be better for them; would they know it! By Him in Whose Hand is my life, none amongst them would go out (of the city) with a dislike for it, but Allah would make his successor in it someone better than be. Behold. Medina is like furnace which eliminates from it the impurities. And the Last Hour will not come until Medina banishes its evils just as a furnace eliminates the impurities of iron.
Abu Huraira (Allah be pleased with him) reported Allah's Messenger (way peace be upon him) as saying
I have been commanded (to migrate) to a town (Medina) which would overpower other towns. They (the people) call it Yathrib; its correct name is (in fact) Medina. It eliminates (bad) people just as a furnace removes the alloy of iron.
This hadith has been narrated by Yabya b. Sa'id with the same chain of transmitters (and the words are)
" Just as a furance removes impurity," but no mention is made of iron.
Jabir b. `Abdullah (Allah be pleased with them) reported that a desert Arab swore allegiance to Allah's Messenger (ﷺ). He suffered from a severe fever in Medina (and) so he came to Allah's Messenger (ﷺ) saying
Muhammad, cancel my oath of allegiance. But Allah's Messenger (ﷺ) refused it. He again came and said: Cancel my oath of allegiance. But he (the Holy Prophet) refused it. He again came to him and said: Cancel my oath of allegiance, but he refused. The desert Arab, however, went away (cancelling the allegiance himself). Thereupon Allah's Messenger (ﷺ) said: Medina is like a furnace which drives away its impurity and purifies what is good.
Zaid b. Thabit reported Allah's Apostle (ﷺ) as saying
It is Taiba, thereby meaning Medina. It drives away impurity just as fire removes the impurity of silver.
Jabir b. Samura (Allah be pleased with him) reported that he heard Allah's Messenger (ﷺ) say
Allah named Medina as Tabba.