Triton possesses a thin atmosphere, primarily composed of nitrogen, sustained by the sublimation of surface ices. The goal is to determine the composition of Tritons atmosphere and to constrain the nature of surface-atmosphere interactions. We perform high-resolution spectroscopic observations in the 2.32-2.37 $mu$m range, using CRIRES at the VLT. From this first spectroscopic detection of Tritons atmosphere in the infrared, we report (i) the first observation of gaseous methane since its discovery in the ultraviolet by Voyager in 1989 and (ii) the first ever detection of gaseous CO in the satellite. The CO atmospheric abundance is remarkably similar to its surface abundance, and appears to be controlled by a thin, CO-enriched, surface veneer resulting from seasonal transport and/or atmospheric escape. The CH$_4$ partial pressure is several times larger than inferred from Voyager. This confirms that Tritons atmosphere is seasonally variable and is best interpreted by the warming of CH$_4$-rich icy grains as Triton passed southern summer solstice in 2000. The presence of CO in Tritons atmosphere also affects its temperature, photochemistry and ionospheric composition. An improved upper limit on CO in Plutos atmosphere is also reported.