On a sub-Riemannian manifold, a connection with skew-symmetric torsion is defined as the unique connection from the class of N -connections that has this property. Two cases are considered separately: sub-Riemannian structure of even rank, and sub-Riemannian structure of odd rank. The resulting connection, called the canonical connection, is not a metric connection in the case when the sub-Riemannian structure is of even rank. The structure of an almost quasi-Sasakian manifold is defined as an almost contact metric structure of odd rank that satisfies additional requirements. Namely, it is required that the canonical connection is a metric connection and that the transversal structure is a Kähler structure. Both the quasi-Sasakian structure and the more general almost contact metric structure, called an almost quasi-Sasakian structure, satisfy these requirements. Sufficient conditions are found for an almost quasi-Sasakian manifold to be an Einstein manifold.