Coating with nickel, cobalt or mixtures thereof with phosphorus or boron