Sounds like you're looking for dielectric grease. You can buy small tubes at any auto parts store.
Here's a simple explanation from another site: "The primary purposes of dielectric grease is to keep out moisture, and
prevent corrosion. Prevention of corrosion keeps the metal-to-metal contact point in
a connector conducting electricity. If the grease conducted electricity, it
would allow the tracking to ground of the power or signal being conducted. It's
neutral and forms an excellent 02 block. Also lubricates but w/o any specific
bulk. Wont' work for heavy loaded bearings, etc. Great for multiple plug
blocks, relay contacts, slide contact switches, rubber lube, speedo cables when
combined w/graphite, etc. In addition it is used for a heat conductor when some
electronic components are mounted on surfaces to dissipate heat (like the
ignition power stage on coils). It is non-conductive, but when you slide the
connectors together there is metal-to-metal contact and the grease gets displaced
but the area around connector is protected from moisture"