What stops me from asking a friend to help me? Or worse still, if this is used as a campus recruitment tool, someone might mail working code to the entire college!
Well yes, but thats applicable any remote interviews. Or even telephonic interviews.
As a solution you could have the candidate solve a challenge on premise. or having him explain the code or make small modification on premise(what i do, if I have a doubt)