It's Monday, so let me rain on this parade a little.
Current magnetic shield designs are adequate to protect against ionizing radiation from the sun. They aren't sufficient to protect against galactic cosmic radiation, which has a lot more energy in each particle. To effectively block that would take a shield with energy 100x greater. If Bamford's shield parameters from TildalWave's answer are used, then 500 kW of power would be needed. It can't be modulated according to current needs, it has to always be at that power level, because GCR is constant, it doesn't fluctuate like solar ionizing radiation. The mass and energy needs of such a system are prohibitive. The effect over time on human health of exposure to a magnetic field of such strength is unknown.
The health effect of cosmic rays at the levels in interplanetary space is not known. Exposure for a year or two may only increase the chances of cancer, or it could be debilitating, if not immediately then a few years down the road. Once we have much more data, it may turn out to be adequate to use a weaker magnetic field that diverts only particles with energies below 500 MeV, for instance - that would be the majority of particles. Or it might not.
See this article on the topic.