and it may soon be possible to build permanent magnets as strong as neodymium magnets, but without any rare earth metals. In fact, the only thing needed to make them is iron and nitrogen ...
A strong magnetic field can act as a shield, preventing solar wind to strip away a planet's atmosphere, but it also can accelerate charged particles or atoms, projecting them into outer space.