The Wheel In Space, Episode 2
John Smith was an alias the Doctor frequently used on Earth and around humans when a “standard” name was needed. In The Wheel In Space, the name was independently used by his companion Jamie McCrimmon while the Doctor was being treated for concussion, as he saw it being used as a brand name on a metal container. Likewise, in Doctor Who The TV Movie (1996) Chang Lee chose to register the name for the Seventh Doctor while he was en route to get his bullet wounds healed.
The Second Doctor used it in The War Games, when questioned by a German soldier, who replied, “Good. Now we are getting somewhere.”
The Doctor adopted it on a semi-regular basis during his third incarnation while exiled on Earth, when he served as unpaid scientific advisor to UNIT. (Spearhead from Space; Inferno; The Time Warrior). [tardis.wikia.com]