It may surprise some people to know that the real key to getting paint to stick---and stay stuck---to metal is all in the cleaning and surface prep. If you can be thorough with your preparation, then you can paint almost any metal surface with success. When purchasing your painting products, always make sure to check for primer and paint compatibility, and buy suitable products for outdoors or indoors, depending on where your metal surface is going to be.
Clean the metal surface thoroughly---this means a bucket of hot, soapy water, a scourer and washing-up gloves, just to be safe. If there is any grease, dirt, dust or other substances on your metal surface, the paint and primer won't bond properly. This goes for rust too--scrape off any flakes, and scrub with the scourer. If there is a very big rust problem, apply a rust deactivator to the metal surface after cleaning.
Wipe the metal with the cloth to dry it. Score the surface of the metal with the wire brush, to give a bit of roughage to the surface---even if you can't feel the difference with your hands, the paint will still bond better. Wear your dust mask while scoring the metal surface. Wipe clean with the cloth.
Apply a coat of primer, following the primer manufacturer's recommended drying times. Use even strokes to apply a uniform coat over the entire metal surface to be painted; let dry.
Paint over the metal surface, double checking that the primer and paint are compatible---if you're unsure when purchasing paints, check with the store clerk. Follow the paint manufacturer's recommended drying times, and apply a second coat of paint; let dry.