The calcium silicate hydrate (C–S–H) gel is the phase that provides cohesive strength to cement. The mechanics of the C–S–H gel at the molecular level is key to the durability of infrastructures made of concrete, controlling for example their macroscopic creep and shrinkage. The existing experimental techniques cannot access the nanostructure and properties of this very heterogeneous phase, and therefore atomistic simulations constitute a valuable alternative. Here we consider two established model systems for the solid part of the C–S–H gel that are representative of perfectly ordered and very disordered molecular structures: crystal tobermorite and glassy C–S–H. Using reactive force field simulations, we calculate elastic properties that match with experimental values from the literature. The analysis of the large deformations under shear indicates that the shear strain localizes preferentially at nanoscale sites that are rich in highly confined water. Implications of our findings for a colloidal description of the C–S–H gel mechanics and for the macroscopic properties of cement are finally discussed.