It will always interfere with instruments, but so long as it's either constant or predictable, then it can be filtered out from the instruments readings.
This is how a lot of earth based astronomy is performed, as earth has a magnetic field, it's atmosphere gets in the way of our images (and spectroscopy etc). But readings take from Earth are still useful because we can predict the impact on the readings, and subtract them from the result.
So how to generate it? A nuclear reactor and an electromagnet is one way - but that'd be power hungry. However you would have to constantly feed power into whatever magnetisation system you're using. Each particle it turns away from the ship will weaken it slightly. [work = force * distance. Force != 0 (it turns away), distance != 0 (the particle is moving while force is applied) therefore work != 0. If work != 0, then energy input is required].
Probably more efficient than a nuclear reactor and electromagnet running all the time is to use the reactor/electromagnet to magnetise a bar of iron. Then you can turn the reactor off until the iron is demagnetised to no longer be useful. You remagnetise it, and off you go again.