The linear response to stochastic and optimal harmonic forcing of small coherent perturbations to the turbulent channel mean flow is computed for Reynolds numbers ranging from Reτ = 500 to 20000. Even though the turbulent mean flow is linearly stable, it is nevertheless able to sustain large amplifications by the forcing. The most amplified structures consist of streamwise-elongated streaks that are optimally forced by streamwise-elongated vortices. For streamwise-elongated structures, the mean energy amplification of the stochastic forcing is found to be, to a first approximation, inversely proportional to the forced spanwise wavenumber while it is inversely proportional to its square for optimal harmonic forcing in an intermediate spanwise wavenumber range. This scaling can be explicitly derived from the linearized equations under the assumptions of geometric similarity of the coherent perturbations and of logarithmic base flow. Deviations from this approximate power-law regime are apparent in the pre-multiplied energy amplification curves that reveal a strong influence of two different peaks. The dominant peak scales in outer units with the most amplified spanwise wavelength of λz ≈ 3.5h, while the secondary peak scales in wall units with the most amplified λz+ ≈ 80. The associated optimal perturbations are almost independent of the Reynolds number when, respectively, scaled in outer and inner units. In the intermediate wavenumber range, the optimal perturbations are approximatively geometrically similar. Furthermore, the shape of the optimal perturbations issued from the initial value, the harmonic forcing and the stochastic forcing analyses are almost indistinguishable. The optimal streaks corresponding to the large-scale peak strongly penetrate into the inner layer, where their amplitude is proportional to the mean-flow profile. At the wavenumbers corresponding to the large-scale peak, the optimal amplifications of harmonic forcing are at least two orders of magnitude larger than the amplifications of the variance of stochastic forcing and both increase with the Reynolds number. This confirms the potential of the artificial forcing of optimal large-scale streaks for the flow control of wall-bounded turbulent flows.