What exact kind of connector is it? There may be a specific connector (eg Molex KK) that will mate with it securely. Unless it's just bare pins, of course, in which case you might be better off removing them completely and either soldering direct to the board or replacing them with a more "standard" connector (like the Molex KK).