The sensor has a housing (1) comprising a housing opening (2), via which a connection cable (3) is guided from the housing. A sealing body (4) is arranged in the housing opening. The sealing body protrudes from the connection cable. A deformed portion of the housing is pressed against the sealing body in a radial manner, where a contour of the housing has a maximum radial extension. Two tapering sections (10) of the deformed portion pass till or proximity to ends of the sealing body in an axial direction, where the sealing body is made of fluororubber.