We measured the equivalent width of a large set of near-infrared (NIR, 0.8--2.4$ mu$m) line-strength indices in the XShooter medium-resolution spectra of the central regions of 14 galaxies. We found that two aluminum indices Al at 1.31 $mu$m and Al1 at 1.67 $mu$m and the two CO indices CO1 at 1.56 $mu$m and CO4 at 1.64 $mu$m are tightly correlated with the velocity dispersion. Moreover, the NIR Al and CO1 indices show strong correlations with the optical Mg2 and Mgb indices, which are usually adopted as $alpha$/Fe-enhancement diagnostics. The molecular FeH1 index at 1.58 $mu$m tightly correlates with the optical <Fe> and [MgFe] indices, which are used as total metallicity diagnostics. The NIR Pa$beta$ index at 1.28 $mu$m has a behaviour similar to the optical H$beta$ index, which is a diagnostic of mean age. We defined two new composite indices, <Al> and [AlFeH], as possible candidates to be used as NIR diagnostics of total metallicity and $alpha$/Fe enhancement. The NIR <Al> index has a strong correlation with the optical Mg2 and Mgb indices, while the [AlFeH] index is tightly correlated with the optical <Fe> and [MgFe] indices. The distribution of the data points in the NIR Pa$beta$-<Al> and Pa$beta$-[AlFeH] diagrams mimic that in the optical [MgFe]-H$beta$ and the Mgb-<Fe> diagrams, which are widely used to constraint the properties of the unresolved stellar populations. We concluded that some NIR line-strength indices could be useful in studying stellar populations as well as in fine-tuning stellar population models.