Generation of electromagnetic (EM) radiation near the second harmonic of the plasma frequency during the injection of an electron beam into a rippled-density plasma channel is investigated using both analytical theory and particle-in-cell simulations. The generating scheme is based on nonlinear interaction of the most unstable beam-driven potential plasma wave with its satellite arising due to scattering on the longitudinal modulation of plasma density. Resulting superluminal oscillations of electric current in a finite-size plasma channel radiate EM waves via the same mechanism which has been recently studied for the fundamental harmonic emission and reffered as a beam-driven plasma antenna. It is shown that theoretical predictions for the optimal plasma width and modulation period are confirmed by simulation results and the power conversion efficiency of the second harmonic emission reaches several percent. Such an efficient mechanism opens the path to explanation of laboratory experiments with a thin electron beam at the GOL-3 mirror trap as well as to developing the scheme of terahertz generation at the gigawatt power level.