1Linear optimal gains are computed for the subcritical two-dimensional separated boundary-layer flow past a bump. Very large optimal gain values are found, making it possible for small-amplitude noise to be strongly amplified and to destabilize the flow. The optimal forcing is located close to the summit of the bump, while the optimal response is the largest in the shear layer. The largest amplification occurs at frequencies corresponding to eigenvalues which first become unstable at higher Reynolds number. Non-linear direct numerical simulations show that a low level of noise is indeed sufficient to trigger random flow unsteadiness, characterized here by large-scale vortex shedding.Next, a variational technique is used to compute efficiently the sensitivity of optimal gains to steady control (through source of momentum in the flow, or blowing/suction at the wall). A systematic analysis at several frequencies identifies the bump summit