The dynamics and control of a vortex pair in ground effect are investigated in a planar, incompressible and laminar setting. The evolution of the vortices obtained numerically shows vortex rebound as a consequence of the separation of the boundary layer induced at the wall by the vortices. An optimal control approach is developed and employed for vortex Reynolds numbers of 200 and 1000 in order to identify the optimal Dirichlet boundary condition at the wall to counteract this rebound and allow for an increased lateral displacement of the vortex, similarly to the inviscid evolution of the flow, which features hyperbolic trajectories. The work is primarily a conceptual approach to deal with aircraft separation distances in airport airspace by moving the vortices laterally, away from the runway but may also apply to the control of coherent structures in wall bounded turbulence. The most efficient control is able to double the lateral position and yields mostly vertical in and outflow at the wall. An optimal horizon time is found, equal to 5 characteristic time units of the vortex system, beyond which control is not able to further displace the vortices. The control is shown to delay the separation of the boundary layer at the origin of vortex rebound by applying suction ahead of the vortex, and to generate a vorticity flux at the wall, leading to a pusher vortex of sign opposite to that of the primary vortex, that attenuates the effect of the no-slip boundary condition at the wall by pushing the vortex outward.