A connecting device for electrically connecting two circuit boards is provided. The connecting device has a first and a second coaxial connector and a coupling member. The two coaxial connectors and the coupling member each have an outer conductor and an inner conductor. The outer conductors of the coaxial connectors are electrically interconnected via the outer conductor of the coupling member and the inner conductors of the coaxial connectors are electrically interconnected via the inner conductor of the coupling member. The coupling member is arranged between the two coaxial connectors so as to be tiltable from an axially aligned orientation and displaceable in an axial direction. The coupling member is held on an elastically deformable dielectric holding ring which surrounds the coupling member in a circumferential direction and is in contact against at least one coaxial connector.